home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / eb63.zip / PACK1.PRG / EB / EB2.REP < prev    next >
Text File  |  1995-02-22  |  112KB  |  2,857 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                           EASY BASE USERS MANUAL
  7.                           ══════════════════════
  8.  
  9.                                 Contents
  10.                                 ────────
  11.  
  12.  
  13.  
  14.  
  15.             System Overview..............................   1
  16.  
  17.             Data Management Principles...................   2
  18.  
  19.             Form Design..................................   6
  20.  
  21.             Relationships and Lookups....................  11
  22.  
  23.             Data Entry...................................  15
  24.  
  25.             Procedures (Reporting).......................  20
  26.  
  27.             Procedures (Transactional)...................  36
  28.  
  29.             User Menus...................................  39
  30.  
  31.             External File Access.........................  43
  32.  
  33.             Data File Format.............................  45
  34.  
  35.             System Requirements and Limitations..........  46
  36.  
  37.             DOS Filename Convention......................  47
  38.  
  39.  
  40.       Easy Base is copyright (c) John Turnbull 1994 published by:-
  41.  
  42.       Easy Software                   Tel/FAX (044) (0) 625 614669
  43.       3 Brookside Court               CIS 100410,717
  44.       Prestbury Road
  45.       Macclesfield
  46.       SK10 3BR
  47.       UK
  48. ................................................................................
  49.  
  50.  
  51.  
  52.  
  53.                                TERMINOLOGY
  54.                                ═══════════
  55.  
  56.  
  57.      Field          The storage space for an individual data item.
  58.      ─────
  59.  
  60.      Record         A set of related data items.
  61.      ──────
  62.  
  63.      Form           The storage space for a set of records.
  64.      ────
  65.  
  66.      Procedure      A set of instructions which manipulate the data
  67.      ─────────      stored in forms.
  68.  
  69.      Relationship   A record in the relationships form recording
  70.      ────────────   a link between forms.
  71.  
  72. ................................................................................
  73.  
  74.  
  75.                       EASY BASE SYSTEM OVERVIEW
  76.  
  77.      Easy Base is a complete rapid programming system for data
  78.      management. Virtually every data management problem can be
  79.      broken down into three areas. Creating disk files (referred to
  80.      as "Forms" in Easy Base) in which to store data, creating
  81.      procedures which manipulate that data and presenting those
  82.      forms and procedures in a logical menu system for use.
  83.  
  84.      In Easy Base you create the forms in which to store data in a
  85.      simple screen-painting environment which not only designs the
  86.      data file but at the same time provides a default data entry
  87.      screen for your data. As you place the "Fields" in which data
  88.      is to be stored you can use relational links ("Lookups") to
  89.      import data from other forms. Each field you create for data
  90.      storage is also treated as a deriveable "Cell" similar to a
  91.      spread sheet. You can make almost any calculation or derivation
  92.      within a field as, apart from all arithmetic, relational and
  93.      logical operators, Easy Base also provides a set of over fifty
  94.      functions covering everything from Modulo arithmetic to
  95.      spelling out dates. Once you have created your forms you can
  96.      use the default screen to enter and view your data using the
  97.      "Data Entry" system.
  98.  
  99.      Once you have data stored you will need to be able to
  100.      manipulate it and report on it. Easy Base provides a combined
  101.      transaction and reporting system ("Procedure Generator"). With
  102.      the procedure generator you can use the default screens you
  103.      have designed or create custom screens in which to gather input
  104.      either from the keyboard or from relational Lookups. You then
  105.      instruct Easy Base what to do with this information using a
  106.      simple "Basic" like programming language. If your procedure is
  107.      transactional you have commands to enter, modify or delete
  108.      records in any number of forms within a single procedure. If
  109.      your procedure is reporting then there are commands to group,
  110.      order and list data in almost every conceivable way.
  111.  
  112.      You now have all the "Parts" required to create a useful data
  113.      management program. All that remains is to tie your procedures
  114.      to a menu system so that other people can use your application
  115.      without having to know anything about Easy Base. Creating an
  116.      end user menu system in Easy base is as simple as filling in a
  117.      form with the text you wish to display and the procedure or
  118.      form you wish to run. You give at least one of your menus a
  119.      start up password. If you then restart Easy Base but sign on
  120.      with that password instead of your developers password then you
  121.      will be running your own custom designed program.
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                  - 1 -
  130. ................................................................................
  131.  
  132.  
  133.                      DATA MANAGEMENT PRINCIPLES
  134.  
  135.      In Easy Base, creating forms and entering data is very easy.
  136.      You will be tempted to rush on and create programs for yourself
  137.      without reading the "Bumf". However, unless you are an
  138.      experienced data programmer, you should at least read this
  139.      section and the one on Relationships before embarking on any
  140.      serious project.
  141.  
  142.      The crux of data management is "Data Integrity" or "Data
  143.      Verification".  You might know that "A Smith", "Smith's Garage"
  144.      and "Smith and Son" are all the same customer of yours but your
  145.      computer definitely does not! If you have a small business you
  146.      might wish to use Easy Base to create invoices - you might be
  147.      tempted to start by creating an invoice form in which you enter
  148.      your customers name, work done and price. - DON'T - Start
  149.      instead by creating a form to hold each of your customers'
  150.      names, addresses, credit limit etc.  If you sell things then
  151.      create a form to hold each of your stock items with their name,
  152.      partno, price etc.  These are your "Core" data forms from
  153.      which you "Lookup" data for other purposes. Each of your "Core"
  154.      data forms has a "Unique" field which defines the record as an
  155.      entity. "Smith's Garage" will always be "Smith's Garage" and
  156.      the lookup function described later will not allow any other
  157.      representation to be entered.
  158.  
  159.      Although of less significance than "Data Integrity", the names
  160.      which you give to forms and fields are very important and worth
  161.      mentioning now. When you come to write "Lookup" derivations and
  162.      later, Procedural code you have to refer to your data by a
  163.      combination of its form and field names. Please give
  164.      considerable thought to the names you use. Each name should be
  165.      short but fully describe the form or field. The names of forms
  166.      should be plural and the names of fields singular. For example
  167.      - a form which is to hold details of your customers should be
  168.      called "Customers", the name field should be called "Name" and
  169.      the credit limit field should be called "Creditlimit" . When
  170.      you need to lookup data from this form the lookup function will
  171.      be written - Lookup(customers,name) and when you write
  172.      procedures the data will be referred to as customers.name ,
  173.      customers.creditlimit etc.  If you did not follow this naming
  174.      convention and called the form "F1" , the name field "customer"
  175.      and the credit limit field "Max cred" then writing procedure
  176.      code would be extremely frustrating.
  177.  
  178.      It is equally important to give the same name to fields which
  179.      hold the same data in different forms. If you already had a
  180.      form called "Employees" which had fields "Worksno", "Name",
  181.      "Address" and "Taxcode" and you then created a "Payslips" form
  182.      the fields which hold the employee's name and taxcode should
  183.      also be called "Name" and "Taxcode". This not only makes it
  184.      easier to remember field names but when you come to write
  185.  
  186.  
  187.                                  - 2 -
  188. ................................................................................
  189.  
  190.  
  191.      procedure code, data can be transferred between one form and
  192.      another with the command "Copy all from". This command only
  193.      transfers data between fields with the same name. If you have
  194.      given different names to the fields in the two forms you will
  195.      have to transfer each individual field separately.
  196.  
  197.      The fields which you create are of four general types - The
  198.      definition (unique) field, grouping fields, ordering fields and
  199.      descriptive fields.
  200.  
  201.      When you create your "Core" data forms it will be fairly
  202.      obvious which is the definition field. In the "Employees" form
  203.      "Worksno" defines the record. In a "Manufacturers" form "Name"
  204.      defines the record. As a general rule, each form should have a
  205.      definition field. There is an exception to this where a form is
  206.      used to store temopary lists (described later) but for the
  207.      moment you should expect to have a definition or "Unique" field
  208.      on each form to prevent duplicate entries. When you create
  209.      secondary forms which lookup data from your "Core" forms the
  210.      data which defines the record as an entity will not necessarily
  211.      be contained solely in one of the fields you wish to display.
  212.  
  213.      As an example - A magazine wholesaler has two "Core" forms, one
  214.      containing details of the magazines he supplies and one
  215.      containing customers details. He creates a form on which to
  216.      record orders from his customers. This "orders" form has three
  217.      fields, "Name"(for the customer), "Magazine" and "Quantity".
  218.      When a customer phones in an order for a particular magazine
  219.      the wholesaler will need to be warned if this particular
  220.      customer has already ordered this particular magazine but no
  221.      one field defines the record. In fact the record is defined as
  222.      unique by a combination of the two fields "Name" and "Magazine"
  223.      In this case, a fourth field should be added to the form in
  224.      which the two fields "Name" and "Magazine" are combined using
  225.      the "jointext" function. This field is then the "Unique" field
  226.      and no duplicate entries will be allowed.
  227.  
  228.      In many secondary forms the records definition will be even
  229.      less obvious but if you are to create data storage for flexible
  230.      reporting you should always attempt to create a suitable
  231.      "unique" field.
  232.  
  233.      For example :- An "Aircraft" form has a field "Manufacturer"
  234.      which is looked up from a "Manufacturers" form. It also has
  235.      fields for "Name" and "Mark". The definition of an aircraft is
  236.      what it is known as. If it has a name then it is known as a
  237.      combination of the manufacturer and the name (Supermarine
  238.      Spitfire) but if it does not have a name it is known as a
  239.      combination of the manufacturer and mark (English Electric P1b)
  240.      Even in these more complicated situations you can still create
  241.      a unique field to prevent duplicates. In the above example you
  242.      would create the unique field "Knownas" and derive it with the
  243.  
  244.  
  245.                                  - 3 -
  246. ................................................................................
  247.  
  248.  
  249.      formula - Jiontext(manufacturer,if(name = blank,mark,name))
  250.  
  251.      When you define a field as unique Easy Base automatically
  252.      indexes this field.
  253.  
  254.      The second type of field is a "Grouping" field. This is a field
  255.      which will be used in procedures to select subsets of records.
  256.      In the "Aircraft" form you might add a field "Type" which would
  257.      qualify each record as belonging to a group - "Fighter",
  258.      "Bomber", "Transport" etc. Grouping fields should also be
  259.      defined as indexed and should always be subject to data
  260.      integrity checking. Where the number of groups is small (17 or
  261.      less) Easy Base provides a quick method of data verification in
  262.      the "Choice" field type. If the number of groups is larger than
  263.      17 then you should create a "Core" form to hold the group names
  264.      and look them up into the secondary form.
  265.  
  266.      The third type of field is used for ordering data. In many
  267.      instances the order in which you wish to print or view data
  268.      will be that of the definition field or one of the grouping
  269.      fields but not always. In the "Aircraft" form you might wish to
  270.      list them by the dates they were first introduced or by the
  271.      total production runs. In order to do this you would have to
  272.      add fields for "Date" and "Production". You would later write
  273.      procedures to list the aircraft with "Date in order" or
  274.      "production in order". Ordering fields should also be indexed
  275.      but they need not necessarily be checked for data integrity.
  276.  
  277.      Fields which are not used for ordering or grouping are
  278.      descriptive and need not be indexed or integrity checked.
  279.  
  280.      One of the most common mistakes made by beginners to data
  281.      management is to create different forms for the same data.
  282.      With the "Aircraft" form above you might be tempted to save all
  283.      the military aircraft of World War 1. Later you might create a
  284.      second form for the aircraft of World War 2. This would be a
  285.      mistake. The data you are recording is "Aircraft". The era to
  286.      which they belong should simply be another "Grouping" field.
  287.      If having saved your data you were asked for a list of all
  288.      "Boeing" military aircraft showing which wars they were used in
  289.      then this could be achieved with one simple procedure if they
  290.      were in one form but would be rather more difficult if they
  291.      were in two.
  292.  
  293.      That example was fairly obvious but on many occasions it will
  294.      be easy to assume that two or more sets of data are separate
  295.      when in fact they are simply groups of the same.
  296.  
  297.      Should you decide to write your own accounting program (Which
  298.      is not as daunting a task as it might seem on the surface) You
  299.      might be tempted to create forms for a Sales Ledger, Nominal
  300.      Ledger and Customers Accounts. In fact the entries in the
  301.  
  302.  
  303.                                  - 4 -
  304. ................................................................................
  305.  
  306.  
  307.      Nominal Ledger and Customers Accounts are simply sub groups of
  308.      the entries in the Sales Ledger. Provided that you include
  309.      grouping fields for the customers account number and nominal
  310.      account name you can construct customers and nominal accounts
  311.      when required by extracting and totalling the sub sets. There
  312.      is no need to save them as separate data.
  313.  
  314.      The final problem you will encounter when deciding how to store
  315.      data is that of "Related Lists".  Consider the "Aircraft" form.
  316.      If you had a grouping for "Airliner" you might wish to record
  317.      all the airlines which operate each aircraft. You cannot just
  318.      add fields to the "Aircraft" form - One airliner might only be
  319.      operated by one airline and another might be operated by fifty.
  320.  
  321.      To store this data you need another form let's call it Userlist
  322.      with fields "Aircraft" , "Airline" and "Uni" which is the
  323.      unique field derived by joining the other two. The "Aircraft"
  324.      field is looked up from the "Aircraft" forms unique field
  325.      "Knownas" and the "Airline" field is looked up from the
  326.      "Airlines" form "Name" field which is also unique.
  327.  
  328.      In this form you enter one record for each combination of
  329.      aircraft and airline. When you come to report on your data you
  330.      can list single records from the main "Aircraft" form together
  331.      with all related records from the "Userlist" form.
  332.  
  333.      ...................PROCEDURE CODE.............
  334.      declare output fields
  335.         aircraft.knownas : Aircraft.production :aircraft.seats
  336.         userlist.airline
  337.      end
  338.      for aircraft with knownas = input.knownas
  339.         print formfields
  340.         for userlist with aircraft = aircraft.knownas
  341.            print userfields
  342.         next
  343.      next
  344.  
  345.      ...................FORMAT.....................
  346.  
  347.      .formfields
  348.                        { Aircraft.knownas field }
  349.  
  350.            Production { Prodn. field}    Seats  {Seats field }
  351.  
  352.                              Operated by :-
  353.  
  354.      .userfields
  355.                       { Userlist.Airline field  }
  356.      .end
  357.  
  358.  
  359.  
  360.  
  361.                                  - 5 -
  362. ................................................................................
  363.  
  364.  
  365.                              FORM DESIGN
  366.  
  367.      To start designing your forms select "Form Design" then "Design
  368.      new Form" from the menu system.  You are presented with a blank
  369.      form. Each form has four pages. To move from one page to the
  370.      next use the PgDn and PgUp keys. To move the cursor around on a
  371.      page use the arrow keys. Designing your form is a bit like
  372.      designing a form on paper. If you were to type on a paper form-
  373.  
  374.               Name     .................
  375.               Address  .................
  376.                        .................
  377.                        .................
  378.                        .................
  379.  
  380.      Then in Easy Base you type Name and Address as above but
  381.      instead of typing the dots you define fields for the data to be
  382.      entered to.
  383.  
  384.      Easy Base provides several facilities for "Polishing" the
  385.      presentation of your forms and these are covered first before
  386.      moving on to field definition.
  387.  
  388.      If you wish to enclose your text within boxes or in some
  389.      tabular format Press F3 and select "Line Drawing".  To draw
  390.      lines on the screen hold down the Alt key, The Ctrl key or both
  391.      and drive the cursor around with the arrow keys. The Alt key
  392.      draws double thin lines, the Ctrl key draws single thin lines
  393.      and a combination of both draws a thick single line. Press Esc
  394.      when you are finished line drawing to return to normal editing.
  395.  
  396.      If you wish to shade areas of the screen then again press F3
  397.      and select "Shading". Shading works much the same as Line
  398.      Drawing.
  399.  
  400.      If you require Greek, Mathematical or International characters
  401.      which cannot be typed directly from the keyboard then press F3
  402.      and select either "Greek and Mathematical" or "International" A
  403.      menu of all such characters provided by your PC will appear.
  404.      The one you select is printed to your form at the cursor
  405.      position.
  406.  
  407.      If you wish to use other than the default text colour then
  408.      press F4 after you have typed your text. In each Easy Base
  409.      screen colour set you can select one of two alternate text
  410.      colours or "Blink" - choose 1, 2 or 3 .  To change the colour
  411.      of your text or lines just hold down the shift key and drive
  412.      the cursor over the text you want to change with the arrow
  413.      keys. Press Esc when you have finished colouring your form.
  414.  
  415.      Text input in the form designer has "overtype" as the default.
  416.      If you wish to move text (or fields) to the right press the
  417.  
  418.  
  419.                                  - 6 -
  420. ................................................................................
  421.  
  422.  
  423.      Ins key. Insert mode is indicated by a block cursor and
  424.      Overtype by an underscore cursor. (This is the opposite to all
  425.      other editors in Easy Base as it keeps the underscore cursor as
  426.      the default)
  427.  
  428.      To insert a blank line above text or fields press F1. You
  429.      cannot scroll text or fields between pages in form design.
  430.  
  431.      If you need to move areas of your form then press F9, shade the
  432.      rectangle you wish to move and move it around with the arrow
  433.      keys. You can also transport the rectangle between pages with
  434.      the PgUp and PgDn keys.  F9 can also be used to erase areas of
  435.      the screen.
  436.  
  437.      When you are ready to define the data fields, position the
  438.      cursor where you want the field to start and press F10.
  439.      A window opens into which you enter all the attributes for the
  440.      field.
  441.  
  442.      The first attribute is "Field Name". If you have typed text to
  443.      the left of the field then Easy Base will have inserted this as
  444.      a default in the Field Name attribute. If it's not the name you
  445.      want just edit it. When you are happy with the field name press
  446.      return or the down arrow to the "Data Type" attribute. A menu
  447.      appears with the nine different field types. (The field types
  448.      are described fully in the Programmers Reference)
  449.  
  450.      When you have chosen a field type the cursor automatically
  451.      moves down to the "Field Length" attribute if you have chosen
  452.      "Text", "Integer", "Fixed Point" or "Floating Point" and to the
  453.      "Mandatory Entry" attribute if you have chosen one of the
  454.      others. Enter the field length you require in characters. If
  455.      you have chosen "Fixed Point" as the field type there are two
  456.      entries, one for the digits left of the decimal point and one
  457.      for the digits right of it. If your field is to hold a currency
  458.      value then the second entry will of course be 2.
  459.  
  460.      You must supply values for the first three field attributes.
  461.      The others all have preset defaults so you can save your field
  462.      at this point if none of the others have to be changed.
  463.  
  464.  
  465.      The next Field Attribute is "Mandatory Entry" which has a
  466.      default of "No".  You can set this to "Yes", "No" or "If". If
  467.      you set it to "Yes" then Easy Base will not allow a record to
  468.      be filed with this field left blank.  If you set it to "If"
  469.      then the "Code Snippet" editor opens up and you can enter the
  470.      condition under which an entry becomes mandatory. If you were
  471.      designing a "Payments" form and one of the fields "Paymethod"
  472.      could be filled with either "Cash" or "Cheque". Then the field
  473.      "ChequeNo" would have to be filled only if the "Paymethod"
  474.      field had "Cheque" entered in it.  To make an entry mandatory
  475.  
  476.  
  477.                                  - 7 -
  478. ................................................................................
  479.  
  480.  
  481.      in the "Chequeno" field only if "Paymethod" is "Cheque" enter -
  482.  
  483.      paymethod = "cheque" in the Code Snippet editor.
  484.  
  485.      When you use the Code Snippet editor for Mandatory Entry and
  486.      for User Entry, only the condition is entered :-
  487.  
  488.            total < 100
  489.            name = blank
  490.            length = blank or breadth = blank
  491.  
  492.      the "if" is assumed.
  493.  
  494.      If you set the "Mandatory Entry" attribute to either "Yes" or
  495.      "If", a window will open into which you can type the message
  496.      which you wish to be displayed should an attempt be made to
  497.      file a blank entry.  If you leave the message blank Easy Base
  498.      will supply the default message "This field must be filled !".
  499.  
  500.      The next attribute is "Unique". This can be set to "Yes" or
  501.      "no".  You can only have one unique field on a form. If you
  502.      have already defined a field as the unique field and you change
  503.      your mind and define another then Easy Base will automatically
  504.      cancel the unique attribute on the first field.  Indexing is
  505.      automatically set to "Yes" for the unique field.
  506.  
  507.      The next attribute is "Indexed". Select "Yes" or "No"
  508.      When you set "Index" to "yes",  Easy Base Creates a separate
  509.      "Index" file in which the contents of the field are kept in up
  510.      to date order. Index files are used by Easy Base in exactly the
  511.      same way that you would use an index in a book to find things
  512.      quickly.
  513.  
  514.      The next attribute is "User entry".  This has a default of
  515.      "Yes" but can be set to "No" or "If".  If you set this
  516.      attribute to "No" then the cursor will not visit the field
  517.      during record entry so the user cannot alter its contents. You
  518.      would normally set this to "No" if the contents are derived or
  519.      calculated from the values of other fields. You can set this
  520.      attribute to "If" if the value entered in another field makes
  521.      this one superfluous. For example, in the "Aircraft" form, if
  522.      you had a field "Passengers" and the type had been entered as
  523.      "Fighter" there would be no point in the cursor moving to the
  524.      "Passengers" field.  When the Code Snippet editor opens you
  525.      could type:-
  526.  
  527.            type = "Transport" or type = "Airliner"
  528.  
  529.      The next field attribute is "Display".   When the cursor
  530.      reaches this attribute a menu appears with the seven different
  531.      ways in which the field can be displayed.
  532.  
  533.  
  534.  
  535.                                  - 8 -
  536. ................................................................................
  537.  
  538.  
  539.      The field display attribute settings have the following
  540.      meaning.
  541.  
  542.      1.  FIELD
  543.  
  544.          The field's size is displayed as a block which shows
  545.          up against the screen background.
  546.  
  547.      2.  TEXT
  548.  
  549.          The field size does not show up against the screen
  550.          background and the contents are in the default text colour.
  551.  
  552.      3.  1ST ALT COL.
  553.  
  554.          As Text but with the contents in the first alternate colour
  555.  
  556.      4.  2ND ALT COL
  557.  
  558.          As Text but with contents in the second alternate colour.
  559.  
  560.      5.  BLINKING
  561.  
  562.          As Text but the contents blink.
  563.  
  564.      6.  INVISIBLE
  565.  
  566.          Neither the size nor the contents can be seen.
  567.          Invisible fields are used to hold compound index fields and
  568.          the results of intermediate calculations which the user
  569.          need not see.
  570.  
  571.      7.  CODEWORD FIELD
  572.  
  573.          The size of a codeword field shows against the screen
  574.          background but its contents are masked by stars.
  575.          Codeword fields are used to collect passwords for
  576.          restricted menus or procedures. An onlooker cannot see the
  577.          password which is being entered.
  578.  
  579.      The final field attribute is "Derived". If you set this to
  580.      "yes" then the Code Snippet editor opens and you can enter the
  581.      formula by which the fields contents are to be derived.
  582.  
  583.      In the Code Snippet editor you can enter almost any derivation
  584.      formula. Formulae consist of field names operators and
  585.      functions.
  586.  
  587.         price * markup
  588.         VATon(net,vatrate)
  589.         datetext(system date)
  590.         if(sex = male,"Mr","Ms")
  591.  
  592.  
  593.                                  - 9 -
  594. ................................................................................
  595.  
  596.  
  597.      All the operators and functions are fully described with
  598.      examples of how they are used in the Programmers Reference.
  599.  
  600.      If in the Code Snippet editor you cannot remember a field or
  601.      function name then Press F1 for the reminder lists.
  602.  
  603.      There is a cut and paste facility in the Code Snippet editor.
  604.      To mark text hold down the shift key and move the cursor with
  605.      the arrow keys. When you release the keys the "Cut" or "Copy"
  606.      choice will appear. To paste text, position the cursor at the
  607.      insertion point and press Shift + Ins.  Text which is cut or
  608.      copied from the derivation of one field can be pasted into the
  609.      derivation of any other field in any other form.
  610.  
  611.      When you have finished entering the field attributes press F2
  612.      to save the field. When you have defined all the fields press
  613.      F2 to save the form.
  614.  
  615.      There is one other facility in the Form Design editor.  If you
  616.      press F5 at any time you enter "Derivation Test Mode".  In
  617.      derivation test mode you can enter data to your fields and
  618.      check if your derivations work correctly.  Any fields which you
  619.      have defined as invisible are not hidden in test mode.  The
  620.      main advantage of test mode as opposed to testing in Record
  621.      Entry comes not when you are designing new forms but when you
  622.      wish to modify one after you have saved many records in it.  If
  623.      you add, delete or alter the length of a field then the entire
  624.      data file has to be reformatted and this takes time.  With
  625.      "Derivation Test Mode" you can ensure that the modifications
  626.      you have made are correct before reformatting.
  627.  
  628.      The only exception to test mode is if you have added a new
  629.      lookup function and you have not yet entered the relationship.
  630.      If you select test mode with a relationship missing you will
  631.      get an error message and be returned to Form Design.
  632.  
  633.      When you save your form Easy Base tests it in derivation test
  634.      mode before saving. If it cannot find a relationship you will
  635.      be given an error message and offered the choice to remain in
  636.      Form Design (which you would do should you know that the
  637.      relationship exists and you must therefore have mistyped a
  638.      lookup formula) or to save and exit anyway. (Which you would do
  639.      if the relationship had not yet been entered)
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.                                  - 10 -
  652. ................................................................................
  653.  
  654.  
  655.                  RELATIONSHIPS AND THE LOOKUP FUNCTION
  656.  
  657.      In Easy Base the Lookup Function together with pre-recorded
  658.      relationship links provide two of the most important facilities
  659.      of a data management system.
  660.  
  661.          1. Reuse of previously entered data.
  662.          2. Verification of text data.
  663.  
  664.      Consider the situation where you have designed a form to hold
  665.      information about your business's customers. The form has an
  666.      "accountno" field which has been derived as "Sequence" and this
  667.      is therefore the "Unique" field on the form.  It also has
  668.      fields "Name" and "Address".  All your customers have now been
  669.      recorded in this form.  You now want to create an invoice form.
  670.      Each invoice issued will have to have a customer's name and
  671.      address entered on it.  All the names and addresses are already
  672.      filed in Easy Base so they do not have to by typed again.
  673.      Provided that Easy Base knows which customer's name and
  674.      address is required it can copy it automatically from the
  675.      "Customers" form to the "Invoice" form.
  676.  
  677.      The way in which Easy Base accomplishes this is exactly the
  678.      same as you would accomplish the task manually in a hand
  679.      written system. If you knew where to find the book in which
  680.      your customers names had been written and you knew the
  681.      customers account number then you could find the customers name
  682.      and address.
  683.  
  684.      The only slight difference for the computer is that while you
  685.      would consider it "Obvious" that the account number on the
  686.      invoice would be the same as the account number in the
  687.      addresses book your computer does not - You have to tell it.
  688.  
  689.      To tell Easy Base where to look and that the "accountno" is the
  690.      link, you enter a record in the "Relationships" form.
  691.  
  692.      When you select "Relationships" from the main menu you will see
  693.      five fields to be filled.  The first field is the name of the
  694.      form which data is to be copied to. In this case you will enter
  695.      "Invoices".  You will notice that easy base has displayed a
  696.      list of all your form names and that you must choose one.  You
  697.      cannot enter the name freehand.  This "internal" data
  698.      verification is the same as you will be doing for your own data
  699.      later.
  700.  
  701.      The second field is for the name of the form in which the data
  702.      can be found.  In this case select "Customers".
  703.  
  704.      The next two fields record which fields in the primary and
  705.      secondary form hold the "Linking" data. In this case select
  706.      "acountno" in both.
  707.  
  708.  
  709.                                  - 11 -
  710. ................................................................................
  711.  
  712.  
  713.      The final field is the name of the relationship record.  You
  714.      will notice that Easy Base has already entered a default name
  715.      of "Customers".  The relationship name can be anything you like
  716.      but as the "Lookup" function which you are about to use quotes
  717.      the relationship name as its first parameter and the field to
  718.      be copied as its second then Lookup(customers,name) has to be
  719.      more meaningful and easy to remember than any other name you
  720.      could give.
  721.  
  722.      When you have entered all the fields press F2 to save the
  723.      relationship, return to Form Design and load your "Invoice"
  724.      form.
  725.  
  726.      All that remains to do now is edit the field attributes of the
  727.      "Name" and "address" fields.  To edit a field you can either
  728.      press F10 with the cursor on the form background and select the
  729.      field to edit by name, or you can position the cursor within
  730.      the field you wish to edit and then press F10, in which case
  731.      the field attribute window will open automatically.  Position
  732.      the cursor in the "Name" field and press F10. Move the cursor
  733.      to the "Derivation" attribute and set it to yes. (you can move
  734.      the cursor from the "Name" attribute directly to the "Derived
  735.      attribute by pressing the up arrow)
  736.  
  737.      When the Code Snippet window opens type -
  738.  
  739.           Lookup(customers,name)
  740.  
  741.      and press F2.  If you had not already done so then set the
  742.      "User Entry" attribute to "No".
  743.  
  744.      Press F2 to save the new field attributes and then do the same
  745.      for the "Address" field, this time entering the derivation -
  746.  
  747.          Lookup(customers,address)
  748.  
  749.      To test that you have typed the lookups correctly press F5 for
  750.      Derivation Test Mode. Enter a customers account number in the
  751.      "Acountno" field and press the return key. If your formulae are
  752.      correct the customers name and address will appear in the
  753.      "Name" and "Address" fields.
  754.  
  755.      In this example you have performed two "Secondary" lookups.
  756.      Both the "Name" and "Address" fields were found using the
  757.      "accountno" link which you had to enter correctly in order
  758.      to find the other two fields.
  759.  
  760.      The real power of the Lookup function is only realized when you
  761.      perform "Primary" and "Secondary" lookups.  In a "Primary"
  762.      lookup the field whose value is to be looked up is also the
  763.      "Link".  It is "Primary" lookups which are used for data
  764.      integrity checking.
  765.  
  766.  
  767.                                  - 12 -
  768. ................................................................................
  769.  
  770.  
  771.      Consider the "Aircraft" and "Manufacturers" forms which were
  772.      discussed earlier.  Suppose that you want to lookup the
  773.      manufactures name and the name of his base airfield into the
  774.      "Aircraft" form.  The definition field in the "Manufacturers"
  775.      form is "Name" - There is no handy "accountno".  You are going
  776.      to have to enter a relationship between "Aircraft" and
  777.      "Manufacturers" linking the two fields "Manufacturer" in the
  778.      "Aircraft" form with "Name" in the "Manufacturers" form.
  779.  
  780.      Having done this you could derive the "Base" field in the
  781.      "Aircraft" form with - Lookup(manufacturers,base) - and it
  782.      would be looked up when you entered the manufacturers Name just
  783.      as in the invoice example.  But what of the "Manufacturers"
  784.      field itself.  Was the name you entered in the manufacturers
  785.      form "A.V.Roe", "A.V.Roe & Co." or "AVRO A/C Co.".
  786.  
  787.      Easy Base provides a simple solution to this problem.
  788.  
  789.      Having entered the relationship, return to Form design and
  790.      enter the lookup derivations. Derive the "Base" field with -
  791.  
  792.          Lookup(manufacturers,base)
  793.  
  794.      and the "Manufacturers" field with
  795.  
  796.          Lookup(manufacturers,name)
  797.  
  798.      This time, leave the "User Entry" attribute set to "Yes" in the
  799.      "Manufacturers" field.
  800.  
  801.      Press F5 for "Test mode".  When the cursor enters the
  802.      "Manufacturers" field type -  AV*  - and press return.
  803.  
  804.      Provided there is only one manufacturer whose name begins with
  805.      "AV" the Avro name will be looked up into the "Manufacturers"
  806.      field and its representation will always be exactly the same as
  807.      the original entry in the "Manufacturers" form.  If there are
  808.      several manufacturers whose names begin with "AV" then a menu
  809.      will appear listing all of them and you can choose the one you
  810.      want. As soon as you select the name the secondary lookup
  811.      "Base" will fill automatically.
  812.  
  813.      If you cannot remember the first letters of the name you want
  814.      to look up - say for example that you could only remember that
  815.      "Roe" was in the name - then type Roe* and press return.  If
  816.      any manufacturers names begin with "Roe" they will be displayed
  817.      first. If not Easy Base will fill the "Manufacturer" field with
  818.      the first name it finds with the letters roe in it.  If this is
  819.      not the one you want press F3.  Each time you press F3 Easy
  820.      Base will find the next name containing the letters until you
  821.      find the one you want.   As a final resort - if you really
  822.      can't remember what you are looking for - just enter an "*" on
  823.  
  824.  
  825.                                  - 13 -
  826. ................................................................................
  827.  
  828.  
  829.      its own and press return. Easy Base will then list all the
  830.      manufacturers names for you to choose from.
  831.  
  832.      There is no limit to the number of secondary lookups which can
  833.      be made from each primary and there is no limit to the number
  834.      of different forms you can look data up from.
  835.  
  836.      If you have many different forms which all look up data from
  837.      the "Customers" form then they can all use the same
  838.      relationship name "Customers" but if you have more than one
  839.      relationship between the same two forms then they must have
  840.      different names.
  841.  
  842.      If you had a "Stock" form with the unique field "Item" and
  843.      another field "Price" then you could add four fields to your
  844.      "Invoice" form - "Item", "Quantity" "Price" and "Total".
  845.  
  846.      You would enter a relationship "Stock" between "Invoice" and
  847.      "Stock" with the related fields being "Item" in both forms.
  848.  
  849.      In your invoice form you would derive :-
  850.  
  851.         Item as    Lookup(stock,item)
  852.         Price as   Lookup(stock,price)
  853.         Total as   quantity * price
  854.  
  855.      When you entered the "Item" field (primary lookup) the price
  856.      field would fill automatically and when you entered the
  857.      "Quantity" the "Total" field would be calculated.
  858.  
  859.      However, if you now add four more fields "Item2", "Price2",
  860.      "Quantity2" and "Total2" you will need another relationship
  861.      between "Invoice" and "Stock" this time linking "Item2" in the
  862.      "Invoice file" with "Item" in the stock file and you cannot now
  863.      use the default name "Stock" for the relationship.
  864.  
  865.      Although you can give your additional relationship any name you
  866.      like, the best name will be "Stock2".
  867.  
  868.      Please note that this example is used purely to show the use of
  869.      multiple relationships between the same two forms.  If you are
  870.      intending to write an invoicing system then unless you know
  871.      that there will only be a limited number of items on each
  872.      invoice this is not a practical way to tackle the problem.
  873.  
  874.      In a flexible invoicing system each item and quantity is
  875.      entered via a procedure to a temporary list form whose contents
  876.      are then printed to the invoice.
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.                                  - 14 -
  884. ................................................................................
  885.  
  886.  
  887.                                DATA ENTRY
  888.  
  889.      As soon as you have designed forms you can enter and view data
  890.      directly using the default screen you created.  To enter data
  891.      to a form select "Data Entry" from the main menu and choose the
  892.      form you wish to use.
  893.  
  894.      Your default entry screen will appear with the cursor in the
  895.      top left field. The top line of the screen shows the name and
  896.      page number of the form you are using together with the system
  897.      date and time. Line 2 shows the number of the record you are
  898.      creating or editing on the left hand side. It is also the line
  899.      on which any error messages are passed. The bottom line lists
  900.      the most used function keys and is also the line on which help
  901.      prompts are displayed.
  902.  
  903.      To move the cursor around between fields you can use all of the
  904.      cursor control keys which work as follows:-
  905.  
  906.      The Return key moves from field to field in the order top left
  907.      to bottom right unless you have overridden this in form design
  908.      by deriving fields with "Goto (fieldname) Next".
  909.  
  910.      The Tab key moves the cursor from field to field in the order
  911.      bottom right to top left (reverse of Return).
  912.  
  913.      The arrow keys move the cursor in the direction indicated.
  914.  
  915.      The Home Key moves the cursor to the beginning of the current
  916.      field if it is not already there and to the first field on the
  917.      page if it is.
  918.  
  919.      The End Key moves the cursor to the end of text if it is in a
  920.      text field and to the last field on the page if it is not.
  921.  
  922.      The PgUp and PgDn Keys move between pages if your form has more
  923.      than one.
  924.  
  925.      When you have entered the data for your first record press F2
  926.      to save it to disk. The screen will clear, the message "Record
  927.      1 has been added" will appear briefly on line two and you will
  928.      be ready to enter the next record.
  929.  
  930.      If some of your fields are primary lookups then you use them
  931.      exactly the same as was described for "Derivation Test Mode" by
  932.      entering part of the text followed by a star and pressing the
  933.      Return Key.
  934.  
  935.      Once you have saved a few records to disk you may wish to view
  936.      or edit them. You can bring previously entered records back to
  937.      the screen for editing in several ways.  From record creation
  938.      the F5 Key brings up the first record and subsequent presses
  939.  
  940.  
  941.                                  - 15 -
  942. ................................................................................
  943.  
  944.  
  945.      bring up the next record. Similarly, from record creation the
  946.      F4 Key brings up the last record and subsequent presses bring
  947.      up the previous record.
  948.  
  949.      Once you have entered several records this process becomes
  950.      impracticable and you "search" for the record you wish to view
  951.      or edit.  Position the cursor in any field and type part of the
  952.      field contents you wish to search for followed by a star and
  953.      press F3.
  954.  
  955.      Searching for records within a form is a similar process to
  956.      looking up data except that you press the F3 rather than the
  957.      Return Key to initiate the process. If the field in which you
  958.      are searching is indexed and more than one record matches the
  959.      data you have entered then Easy Base will make a list of all
  960.      the field contents which match for you to choose from.  If the
  961.      field is not indexed then Easy Base will bring up the first
  962.      record it finds a match in. If this is not the record you want
  963.      then press F3 again. Easy Base will find another match on each
  964.      successive press of the F3 key until you find the record you
  965.      want. As with lookups, Easy Base will search for "Part Matches"
  966.      after it has exhausted all the records where the entered data
  967.      matches the beginning of the field and if you enter a star on
  968.      its own and press F3, Easy Base will list all the field
  969.      contents for you to choose from.
  970.  
  971.      When you have brought a previously entered record back to the
  972.      screen you will notice that line 2 now displays "Editing Record
  973.      x of y " rather than "Creating New Record x ".  Easy Base
  974.      automatically changes from "Create" to "Edit" mode when you
  975.      view a record.  The changes which you make on screen are not
  976.      entered to the record on disk until you press F2.
  977.  
  978.      To clear the contents of the field in which the cursor lies
  979.      rather than delete each character press F6. To return to
  980.      "Create" mode press F6 twice.
  981.  
  982.      Not all of the active function keys are listed on the prompt
  983.      line. To see a full menu of the function key uses press F1 for
  984.      the Function Key Menu.  The following is a summary of the
  985.      function key usage in Data Entry:-
  986.  
  987.      F1
  988.  
  989.      The F1 Key brings up the function key Menu.
  990.  
  991.      F2
  992.  
  993.      The F2 Key writes a new record from "Create" and updates the
  994.      record on screen from "Edit" mode.
  995.  
  996.  
  997.  
  998.  
  999.                                  - 16 -
  1000. ................................................................................
  1001.  
  1002.  
  1003.      F3
  1004.  
  1005.      The F3 key initiates searches for previously entered records
  1006.      based on the data entered in the current field.
  1007.  
  1008.      F4
  1009.  
  1010.      The F4 key moves to the previous record when in "Edit" mode and
  1011.      to the last record from "Create" mode.
  1012.  
  1013.      F5
  1014.  
  1015.      The F5 Key Moves to the next record when in "Edit" mode and to
  1016.      the first record from "Create" mode.
  1017.  
  1018.      F6
  1019.  
  1020.      The F6 key clears the current field on the first press and
  1021.      returns you to "Create" mode on the second press.
  1022.  
  1023.      F7
  1024.  
  1025.      The F7 key deletes the record currently on screen in "Edit"
  1026.      mode.  When you delete a record with the F7 key it is not
  1027.      actually erased from the disk. It is simply "Flagged" for
  1028.      deletion at the next "Pack" operation. If you delete a record
  1029.      accidentally you can reinstate it any time before the form is
  1030.      next packed.
  1031.  
  1032.      F8
  1033.  
  1034.      The F8 key creates a new record by copying the record currently
  1035.      on screen. If a new record you wish to create contains similar
  1036.      data to one already entered then you can find the previous
  1037.      entry, change the unique field and copy it with F8 rather than
  1038.      type it all again.
  1039.  
  1040.      F9
  1041.  
  1042.      If you know the number of the record you wish to view or edit
  1043.      you can press F9 and enter the record number. Easy Base will
  1044.      then bring the record whose number you have entered to the
  1045.      screen.
  1046.  
  1047.      F10
  1048.  
  1049.      When you press the F10 key Easy Base searches for records which
  1050.      are "Flagged" for deletion.  When it finds one it will bring it
  1051.      to the screen. You can reinstate a deleted record by pressing
  1052.      F2 while it is on screen. The F5 key searches for the next
  1053.      deleted record and the Escape key returns you to "Live
  1054.      Records".
  1055.  
  1056.  
  1057.                                  - 17 -
  1058. ................................................................................
  1059.  
  1060.  
  1061.      F11
  1062.  
  1063.      If you have been viewing records and you wish to return to one
  1064.      which you had on screen earlier then press F11 and Easy Base
  1065.      will back step through the records you have viewed.
  1066.  
  1067.      F12
  1068.  
  1069.      The F12 key brings up the form's "Options". There are four
  1070.      options in Data Entry.
  1071.  
  1072.         1. Clear screen on Adding Record.             (Default Yes)
  1073.         2. Confirmation Required to delete Records.   (Default Yes)
  1074.         3. Confirmation Required to abandon Edits     (Default No)
  1075.         4. Clear Field on Editing                     (Default No)
  1076.  
  1077.      If you change "Clear Screen on adding Record" to "No" then,
  1078.      when you press F2 to file a new record, the data which is
  1079.      written to disk remains on screen ready for the next new
  1080.      record. This is useful if you are entering several records and
  1081.      many of the fields in each record contain the same data. You
  1082.      only have to overwrite the fields which are different each
  1083.      time.
  1084.  
  1085.      If you have many records to delete then set option 2 to "No"
  1086.      and you will be able to delete them without having to confirm
  1087.      each one.
  1088.  
  1089.      If you set option 3 to "Yes" then Easy Base will ask you to
  1090.      confirm that you wish to leave a record which you have edited
  1091.      but not updated to disk.
  1092.  
  1093.      If you set option 4 to "Yes" then Easy Base will clear the
  1094.      old contents of any field you start to edit.  This is most
  1095.      useful when used in conjunction with option 1. You can file a
  1096.      record, retain the contents for the next record and when you
  1097.      edit the fields which are different you do not have to first
  1098.      delete the data in them.
  1099.  
  1100.      The options you set for any given form remain with it until
  1101.      changed. They do not revert to the defaults when your computer
  1102.      is turned off and each form can have different option settings.
  1103.  
  1104.      Ctrl + E
  1105.  
  1106.      If you press the "E" key while holding down the Ctrl key you
  1107.      will get the extended "Greek" and "International" characters
  1108.      menu which was discussed in form design.
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.                                  - 18 -
  1116. ................................................................................
  1117.  
  1118.  
  1119.      Ctrl + S
  1120.  
  1121.      If you press The "S" key while holding down the Ctrl key you
  1122.      start the Spell-checker.  The Spell-checker will check the
  1123.      current field. If it finds a word not included in the Easy base
  1124.      dictionary it will offer you the choices to leave the word and
  1125.      continue, add the word to the dictionary, or choose one of the
  1126.      suggestions for replacement.
  1127.  
  1128.      The Spell checker does not automatically move from field to
  1129.      field but once you have started it, it remains active and will
  1130.      immediately check the next text field you move the cursor to.
  1131.  
  1132.      The Spell-checker is cancelled if you press the Escape key or
  1133.      if you press the F2 key to update the record.
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.                                  - 19 -
  1174. ................................................................................
  1175.  
  1176.  
  1177.                         PROCEDURES (REPORTING)
  1178.  
  1179.      The Easy Base procedure generator is the means by which you
  1180.      manipulate and report on your data.
  1181.  
  1182.      Each procedure has at least one part, the procedure code.  The
  1183.      procedure code contains the instructions you write to tell Easy
  1184.      Base what you want done.
  1185.  
  1186.      If your procedure has an "output", in other words your
  1187.      instructions tell Easy Base to send data to the screen or to
  1188.      the printer, then the procedure must also have an Output
  1189.      Format. The Output Format is where you show Easy Base how you
  1190.      want the data you are about to "output" arranged on the screen
  1191.      or page.
  1192.  
  1193.      If what your procedure is to do depends on variables, ie it
  1194.      requires information from the operator or from Looked up data
  1195.      from one or more of your forms then it also requires an "Input
  1196.      Screen".  The Input Screen is where you gather the variable
  1197.      information that your procedure needs in order to carry out its
  1198.      task.
  1199.  
  1200.      Select "procedures" from the main menu and have a look at the
  1201.      items on the procedures menu.
  1202.  
  1203.      You will notice that the menu has pre-selected item 2 "Load
  1204.      Existing Procedure". Other than your first procedure this is
  1205.      the most useful starting point.  Item 1, "Create New Procedure"
  1206.      is only required if you wish to start a new procedure after you
  1207.      have another one loaded. The three parts to a procedure
  1208.      mentioned above are created and edited at items 3,4 and 5.
  1209.  
  1210.      Procedures, like forms, are saved to disk and can be re-used
  1211.      repeatedly. Item 6 runs the current procedure and item 7 saves
  1212.      it to disk.
  1213.  
  1214.      Item 8 deletes procedures which are no longer required and Item
  1215.      9 copies an existing procedure. Often you will require a
  1216.      procedure which is similar to one you have already created. It
  1217.      is much quicker to copy the first procedure and then edit it
  1218.      than to start a new procedure from scratch.
  1219.  
  1220.      Item 10 recalls the last output from a procedure to the screen.
  1221.      If you need to see the output from a procedure but it is not
  1222.      imperative that you have the most up to date information,
  1223.      (close of business / month end figures Etc) then it is much
  1224.      quicker to view the last output than to re-run the procedure.
  1225.  
  1226.      Finally, a small window just below the menu shows the name of
  1227.      the currently loaded procedure. In this case it is "Untitled".
  1228.  
  1229.  
  1230.  
  1231.                                  - 20 -
  1232. ................................................................................
  1233.  
  1234.  
  1235.      If you have not already done so, read the descriptions of the
  1236.      Declare, For..Next, If..Then, Print and Printer Control
  1237.      commands in the Programmers Reference now. These are the basis
  1238.      of all "reporting" procedures and should be thoroughly
  1239.      understood. If you are a programming beginner then some of the
  1240.      examples in the For..Next section may seem a bit advanced -
  1241.      Just ignore them - for the moment it is only important that you
  1242.      understand the principle of the loop and the qualifications
  1243.      that can be applied to it.
  1244.  
  1245.      Now select item 4 to write your first Procedure Code.
  1246.      The next few pages will describe simple reporting procedures
  1247.      based on the "Aircraft" form. To write like procedures for the
  1248.      forms you have designed all you have to do is substitute your
  1249.      form and field names.
  1250.  
  1251.      Before you start, have a look at the function key list on the
  1252.      bottom line. F2 saves your code and checks it. If you press the
  1253.      Escape key your code is still saved but the checking routine is
  1254.      bypassed. If you have written code and find that it is not
  1255.      passed on F2 because, for example, one of your form fields
  1256.      needs to be indexed, then you can still save the code you have
  1257.      written while you modify the form.
  1258.  
  1259.      F3 and F4 provide search and replace facilities similar to a
  1260.      word processor.
  1261.  
  1262.      There is a cut and paste system.  To mark code for cutting or
  1263.      copying hold down the Shift key and shade the code with the
  1264.      arrow keys.  As soon as you release the keys a menu will pop up
  1265.      with three options - Cut, Copy or Indent. The cut and copy
  1266.      options work exactly the same as in the Code Snippet editor
  1267.      with Shift + Ins used to paste the text. If you select "Indent"
  1268.      then you can indent all the selected lines at once with the
  1269.      left and right arrow keys.
  1270.  
  1271.      If you want to print out your code then press F10.
  1272.  
  1273.      The F1 key, labelled "Help" is the key you use when you can't
  1274.      remember something.  It has all the names of your forms, the
  1275.      names of the fields in each form and the names of all Commands,
  1276.      functions, and System values.  If Easy Base recognizes the
  1277.      context of your procedure when you press F1 then it will list
  1278.      the names you need (Formnames, fieldnames or Commands). If not
  1279.      a menu will appear from which you can pick which you need.
  1280.  
  1281.      With the cursor at the start of the top line on your blank
  1282.      procedure screen press F1.
  1283.  
  1284.      The "Commands" reminder list appears on the right hand side of
  1285.      the screen.  The command you want is the first one , "Declare
  1286.      Output Fields" but before selecting it have a look at how to
  1287.  
  1288.  
  1289.                                  - 21 -
  1290. ................................................................................
  1291.  
  1292.  
  1293.      select from the reminder lists. There are over fifty commands
  1294.      on this list but only the first seventeen are shown. You can
  1295.      scroll though them with the arrow keys but you can also use the
  1296.      inbuilt alphabetic search facility. If you type "o" then the
  1297.      highlight bar will move directly to the "Odd Page Print"
  1298.      command.
  1299.  
  1300.      Take the highlight bar back to the "Declare Output Fields"
  1301.      command either by scrolling or by pressing the Home key and
  1302.      press return.  The command will be inserted on the first line,
  1303.      the cursor will move to the second line and the "Forms"
  1304.      reminder list will appear.  Select the form which you wish to
  1305.      report on. In my example case this will be "Aircraft".
  1306.      "Aircraft." is inserted on the second line and the "fields"
  1307.      reminder list appears. I select "Knownas".  I also wish to list
  1308.      the aircraft's mark and type so I write.
  1309.  
  1310.      Declare output fields
  1311.         Aircraft.knownas : Aircraft.mark : Aircraft.type
  1312.      end
  1313.  
  1314.      Declare the fields you wish to list either by typing them
  1315.      freehand or by pressing F1 for reminders.
  1316.  
  1317.      Now complete your procedure code:-
  1318.  
  1319.      Declare Output fields
  1320.         Aircraft.knownas : Aircraft.mark : Aircraft.type
  1321.      end
  1322.      for Aircraft
  1323.         Print list items
  1324.      next
  1325.  
  1326.      and press F2 to check and save the code.
  1327.  
  1328.      If you have typed everything correctly you will be returned to
  1329.      the Procedures menu.  If you have misspelled something then the
  1330.      line with the error will be highlighted and you will get an
  1331.      error message. Correct the error and press F2 again.
  1332.  
  1333.      Easy Base now knows that it is to list the three fields
  1334.      Knownas, Mark and Type from all the records in the "Aircraft"
  1335.      form.  It does not know how they are to be arranged or whether
  1336.      they are to be printed or just shown on screen. This
  1337.      information must now be recorded on the procedures "Output
  1338.      Format".
  1339.  
  1340.      Select item 5, "Output Format", from the procedures menu and
  1341.      have a look at the screen. As usual the bottom line shows the
  1342.      function key usage. To insert a blank line you use F1 as in
  1343.      form design. F2 saves the format and the Escape Key abandons
  1344.      it. F3 gives you a line drawing facility similar to that in
  1345.  
  1346.  
  1347.                                  - 22 -
  1348. ................................................................................
  1349.  
  1350.  
  1351.      form design and Ctrl + "E" brings up the Greek and
  1352.      International characters menu.  The F10 Key is used to place
  1353.      your output fields.
  1354.  
  1355.      The upper status line shows the paper size you have selected at
  1356.      the left hand edge. If you scroll to the right it also shows
  1357.      where the right hand edge of your paper will be at the three
  1358.      different print sizes 10, 12, and 17 characters per inch.
  1359.  
  1360.      On the right hand side of the screen a small menu will have
  1361.      appeared offering you a choice of Format Section names. You do
  1362.      not have to use one of these they are just to save you time.
  1363.      For the moment select "List Items" from this menu.
  1364.  
  1365.      .List items  will appear on the first line and the cursor will
  1366.      move to the second.  For a first procedure we will simply list
  1367.      the fields required in columns. To do this move the cursor in
  1368.      along the second line to leave a reasonable margin and press
  1369.      F10 to place the first field.  A menu appears listing the three
  1370.      fields which were declared in the procedure's code. I select
  1371.      "Aircraft.knownas".  As soon as The field has been selected a
  1372.      window opens showing the default type and length of the field.
  1373.      You can change these defaults if you wish the printed length or
  1374.      type(for numeric fields) to be different in the report to what
  1375.      it is in the form. This window also presents an extra attribute
  1376.      marked "Trim Trailing Spaces" which defaults to "No". If you
  1377.      set this to "Yes" then any blanks at the beginning or end of
  1378.      the fields contents will not be printed at run time. This
  1379.      facility is used mainly for inserting numbers or names into
  1380.      form letter text.
  1381.  
  1382.      Press F2 to accept the defaults. The area which the field will
  1383.      occupy is shown on screen. Now move the cursor to the right and
  1384.      place the other two fields. Finally, press the return key to
  1385.      take the cursor to a new line and type a full stop ".".  The
  1386.      section names menu appears again.  This time select "End".
  1387.  
  1388.      The format screen now looks like this.
  1389.  
  1390.      .List Items
  1391.           ██████████████    ████████████   ████████████
  1392.      .End
  1393.  
  1394.      Press F2 to save the format. When you do, a new menu will pop
  1395.      up with four choices for the output destination. The exact
  1396.      meanings of these selections will be discussed shortly.  For
  1397.      the moment select "Output to Screen". When the Procedures menu
  1398.      appears select item 7 and save your procedure to disk.
  1399.  
  1400.      Now select item 6 and run the procedure.
  1401.  
  1402.      The fields from each record of the "Aircraft" form are listed
  1403.  
  1404.  
  1405.                                  - 23 -
  1406. ................................................................................
  1407.  
  1408.  
  1409.      down the screen. When the list reaches the bottom line the
  1410.      screen starts to scroll.  When all records have been listed the
  1411.      screen returns to the start of the list from where you can
  1412.      browse the report. If the list is long you can pause the output
  1413.      by pressing the return key while it is still running. Once the
  1414.      report is complete you can browse through it using the PgUp,
  1415.      PgDn and arrow keys.  You can also use the text search facility
  1416.      at F3.
  1417.  
  1418.      When you have finished reading the report press Escape to
  1419.      return to the procedures menu.  You can browse the report again
  1420.      at any time by selecting item 10 (Recall Last Output). Try it
  1421.      now.  While browsing a report you can also print it out by
  1422.      pressing F10.  If you press F10 to print a report from browse
  1423.      mode you invoke a low level print driver which prints the
  1424.      report at 10 CPI, 6 LPI in draft mode. Other font sizes and
  1425.      effects such as Bold and Underline are only available when you
  1426.      direct the report output to the printer at run time.
  1427.  
  1428.      To try printer effects select "Edit Procedure Code" and change
  1429.      The code to:-
  1430.  
  1431.      Declare output fields
  1432.         Aircraft.knownas : Aircraft.mark : Aircraft.type
  1433.      end
  1434.      Bold on
  1435.      12 CPI
  1436.      for aircraft
  1437.         print list items
  1438.      next
  1439.  
  1440.      Save the new code and select "Edit Output Format". There is
  1441.      nothing to change in the format itself but when you press F2 to
  1442.      save it, this time choose "Choose at Run time" for the output
  1443.      destination.
  1444.  
  1445.      When you now select "Run Procedure", the computer will beep and
  1446.      you will be asked whether the output is to be to the screen or
  1447.      printer. Choose printer and easy base will print your report in
  1448.      bold at 12 characters to the inch. (Assuming you have installed
  1449.      the correct printer driver from the utilities menu)
  1450.  
  1451.      You will notice that while Easy Base was printing your report
  1452.      it also output it to the screen but on completion it returned
  1453.      you to the procedures menu without invoking Browse mode.
  1454.  
  1455.      The output destinations which you choose when saving the output
  1456.      format are not "Either or" choices.  Irrelevant of your choice
  1457.      the output is always sent to both the screen and the disk file.
  1458.      It is the disk file that you browse when you select "Recall
  1459.      Last Output".  The differences between the choices are that
  1460.      only an output to the screen invokes Browse mode on completion
  1461.  
  1462.  
  1463.                                  - 24 -
  1464. ................................................................................
  1465.  
  1466.  
  1467.      and only an output to printer prints the report. Output to disk
  1468.      is only selected if you want to update reports from a Batch
  1469.      Execute menu.
  1470.  
  1471.      Now let's try something a bit more interesting. So far the
  1472.      report simply lists the aircraft in the order in which the
  1473.      records were filed.  To list them in alphabetic order, edit the
  1474.      procedure code and change the "For" line to:-
  1475.  
  1476.      for aircraft with knownas in order
  1477.  
  1478.      Save the code.  Easy Base can only list in order if the field
  1479.      you wish the order to be done by is indexed.  If the field you
  1480.      have chosen is not indexed you will get an error message.  If
  1481.      this happens, save the code by pressing the Escape Key - Save
  1482.      the procedure at item 7 then return to form design.  Load your
  1483.      form - edit the attributes for the field changing Indexed to
  1484.      "Yes".
  1485.  
  1486.      You can now reload your procedure and run it. This time the
  1487.      aircraft names will be in alphabetic order.
  1488.  
  1489.      Because a procedure has up to three parts it may not at this
  1490.      stage be obvious how Easy Base is handling the "Saving" or
  1491.      "Abandoning" of separate parts.  Here is a quick explanation.
  1492.      If you escape from either the output format or later the input
  1493.      screen and choose to "abandon" it you are abandoning it in the
  1494.      version of the report you are editing only. If you escape from
  1495.      the procedures menu and choose to "abandon" the procedure then,
  1496.      if it is a new "Untitled" procedure it is lost but if it is a
  1497.      procedure which you have loaded for editing then it is only the
  1498.      edits which are abandoned - The original procedure remains
  1499.      unchanged on disk. A procedure which you have loaded for
  1500.      editing is only changed on disk when you save it with item
  1501.      seven from the procedures menu.  At any time during the editing
  1502.      of a procedure you can throw away all your edits and return to
  1503.      the original version by reloading it from disk and replying
  1504.      "No" when you are asked if you wish to save the currently
  1505.      loaded version.
  1506.  
  1507.      Suppose now that we wished to list the aircraft in groups by
  1508.      type - all the bombers together - all the fighters together
  1509.      Etc.
  1510.  
  1511.      To do this, edit the procedure code again and change the "For"
  1512.      line to: -
  1513.  
  1514.      for aircraft with type in order
  1515.  
  1516.      This time, when the report is run, all the airliners come first
  1517.      followed by the bombers etc. but the group field "Airliner" ,
  1518.      "Bomber" etc. is listed on each line and it would be much
  1519.  
  1520.  
  1521.                                  - 25 -
  1522. ................................................................................
  1523.  
  1524.  
  1525.      neater if it could be separated or printed in Bold or
  1526.      underline.
  1527.  
  1528.      Edit the code again, this time to:-
  1529.  
  1530.      Declare output fields
  1531.         Aircraft.knownas : Aircraft.mark : Aircraft.type
  1532.      end
  1533.      declare variables
  1534.        lasttype as text
  1535.      end
  1536.      for Aircraft with type in order
  1537.         if aircraft.type <> lasttype then print group header
  1538.         lasttype = aircraft.type
  1539.         print list items
  1540.      next
  1541.  
  1542.      In this code we have introduced a text variable "lasttype".
  1543.      During the "For" loop the list items will be printed on each
  1544.      iteration but the group header will only be printed when the
  1545.      type changes
  1546.  
  1547.      Now edit the output format to:-
  1548.  
  1549.      .group header
  1550.  
  1551.          ████████████████
  1552.      .list items
  1553.                  ███████████████     ██████████████
  1554.      .end
  1555.  
  1556.      The group header starts with a blank line which will separate
  1557.      the groups. It contains only the "Type" field.  The list items
  1558.      section contains the "Knownas" and mark fields.
  1559.  
  1560.      When you run this report the output will be:-
  1561.  
  1562.         Airliners
  1563.                 Boeing 707
  1564.                 Dehaviland Comet     Mk4
  1565.                 Boeing Jumbo Jet     747
  1566.  
  1567.         Bombers
  1568.                 Boeing B52
  1569.                 Avro Vulcan
  1570.                 Avro lancaster       2
  1571.  
  1572.  
  1573.      If you want the group header to be in bold or underline then
  1574.      all you have to do is insert the on and off commands before and
  1575.      after the "Print group header" command using the block If then
  1576.      construction.
  1577.  
  1578.  
  1579.                                  - 26 -
  1580. ................................................................................
  1581.  
  1582.  
  1583.      Declare output fields
  1584.         Aircraft.knownas : Aircraft.type : Aircraft.mark
  1585.      end
  1586.      declare variables
  1587.         lasttype as text
  1588.      end
  1589.      for Aircraft with type in order
  1590.         if aircraft.type <> lasttype then
  1591.            bold on : underline on
  1592.            print group header
  1593.            bold off : underline off
  1594.         end if
  1595.         print list items
  1596.      next
  1597.  
  1598.      As a beginner, you are probably wondering about the reason for
  1599.      the indentations after the "for" and "if" lines. The code will
  1600.      work perfectly well without them. When you come to write more
  1601.      advanced procedures you will have many For loops, Do Loops and
  1602.      If conditions interwoven with each other.  If each has its own
  1603.      indentation then you will be able to see at a glance which
  1604.      commands occur within which loops and conditions and your code
  1605.      will be very easy to read and edit.
  1606.  
  1607.      Going back to the "Aircraft" listing procedure, we now have
  1608.      each group separated but the aircraft names themselves are no
  1609.      longer in alphabetic order.  This is because we changed index
  1610.      files when we selected "With Type in order".  It is now the
  1611.      "Type" groupings which are in alphabetic order.  Suppose that
  1612.      we want to keep this grouping but still list the aircraft in
  1613.      each group with their names in order.  Neither of the index
  1614.      files on the "Knownas" or "Type" fields can produce this order.
  1615.      We need a combined or "Compound" index on both fields
  1616.  
  1617.      To construct this index, save the present procedure and return
  1618.      to form design.  Load the "Aircraft" form and add a new field
  1619.      anywhere on it. Assuming the length of the "Knownas" field as
  1620.      45 and the length of the "Type" field as 14 the new fields
  1621.      attributes are:-
  1622.  
  1623.      Name         Typename
  1624.      Type         Text
  1625.      Length       59
  1626.      Mandatory    No
  1627.      Unique       No
  1628.      Indexed      Yes
  1629.      User Entry   No
  1630.      Display      Invisible
  1631.      Derived      Yes
  1632.  
  1633.      The derivation formula is:-
  1634.      Jointext(spacepad(type,15),knownas)
  1635.  
  1636.  
  1637.                                  - 27 -
  1638. ................................................................................
  1639.  
  1640.  
  1641.      Test that the derivation formula is correct by pressing F5 for
  1642.      test mode. When you type a name into the "Knownas" field and a
  1643.      type in the "Type" field the new field should derive as a
  1644.      combination of the two.
  1645.  
  1646.      Escape from test mode and press F2 to save the form. Easy Base
  1647.      will first re-format the data file to incorporate the new field
  1648.      and then write the new index file.
  1649.  
  1650.      When this is complete, return to the procedure and edit the
  1651.      "For line of the code from:-
  1652.  
  1653.      For aircraft with type in order
  1654.  
  1655.      to
  1656.  
  1657.      For Aircraft with typename in order
  1658.  
  1659.      No change is necessary to the output format.  The output will
  1660.      be laid out as before but the names in each group will be in
  1661.      alphabetic order.
  1662.  
  1663.      To "Polish" the "Aircraft" report it would be nice if it had a
  1664.      heading. We would also like to prevent the list from running
  1665.      off the end of the page when printed and add a page number at
  1666.      the foot of each page.
  1667.  
  1668.      To do these things edit the code to:-
  1669.  
  1670.      Declare output fields
  1671.         Aircraft.knownas : Aircraft.type : Aircraft.mark
  1672.         page number                  'New Field
  1673.      end
  1674.      Declare variables
  1675.         lasttype as text
  1676.      end
  1677.      bold on
  1678.      print report header
  1679.      for aircraft with typename in order
  1680.         if bottom margin < 1 then
  1681.            bold on : print page footer
  1682.            page feed : print page header : bold off
  1683.         end if
  1684.         if aircraft.type <> lasttype then
  1685.            bold on : underline on
  1686.            print group header
  1687.            bold off : underline off
  1688.         end if
  1689.         print list items
  1690.      next
  1691.      print report footer
  1692.  
  1693.  
  1694.  
  1695.                                  - 28 -
  1696. ................................................................................
  1697.  
  1698.  
  1699.      Now edit the output format to:-
  1700.  
  1701.      .Report header
  1702.          ════════════════════════════════════════════════════
  1703.                      AIRCRAFT LIST BY TYPE
  1704.          ────────────────────────────────────────────────────
  1705.      .Group Header
  1706.  
  1707.          ████████████████
  1708.      .List Items
  1709.                  ████████████████     ██████████████████
  1710.      .Page header
  1711.          ════════════════════════════════════════════════════
  1712.                   Aircraft List By Type (Cont)
  1713.          ────────────────────────────────────────────────────
  1714.      .Page Footer
  1715.  
  1716.                              - ██ -
  1717.      .Report Footer
  1718.          ════════════════════════════════════════════════════
  1719.      .End
  1720.  
  1721.      The new print sections Report Header, Report Footer, and Page
  1722.      Header contain only fixed text.  The new section Page Footer
  1723.      contains the new field "page number" and the "Trim trailing
  1724.      spaces" attribute should be set to "Yes" in this.  This will
  1725.      keep the correct spacing of   - 9 -    and   - 10 -    when the
  1726.      page numbers are printed.
  1727.  
  1728.  
  1729.      So far all the fields we have printed are from the same form
  1730.      "Aircraft".  Suppose that we also wanted to list the country of
  1731.      origin for each aircraft.  The "Aircraft" form does not hold
  1732.      this information but the "Manufacturers" form has a field
  1733.      "Nationality". To incorporate this field into the report all we
  1734.      have to do is declare it as an output field and then arrange to
  1735.      have that field in memory when we print the list items. We can
  1736.      load the correct record from the "Manufacturers" form by using
  1737.      the linking data "Name" in the manufacturers form and
  1738.      "Manufacturer" in the "Aircraft" form.  This is a similar
  1739.      process to looking up data except that a pre defined
  1740.      relationship is not necessary. We can tell Easy Base exactly
  1741.      what we want within the code.
  1742.  
  1743.      Declare output fields
  1744.         Aircraft.knownas : Aircraft.type : Aircraft.mark
  1745.         Manufacturers.nationality : Page number
  1746.      end
  1747.      Declare variables
  1748.         Lasttype as text
  1749.      end
  1750.  
  1751.  
  1752.  
  1753.                                  - 29 -
  1754. ................................................................................
  1755.  
  1756.  
  1757.      '.....................PRINT REPORT HEADING...
  1758.      print report header
  1759.      '.................
  1760.      for aircraft with typename in order
  1761.         '..................PRINT HEADERS AND FOOTERS...
  1762.         if bottom Margin < 1 then
  1763.            bold on : print page footer
  1764.            page feed : print page header : bold off
  1765.         end if
  1766.         '..................PRINT GROUP HEADERS.........
  1767.         if aircraft.type <> lasttype then
  1768.            bold on : underline on
  1769.            print group header
  1770.            bold off : underline off
  1771.         end if
  1772.         '...............LOAD MANUFACTURERS NATIONALITY..
  1773.         for manufacturers with name = aircraft.manufacturer
  1774.            Print list items
  1775.         next
  1776.         '..............
  1777.      next
  1778.      print report footer
  1779.  
  1780.      Because the procedure code is becoming longer, remarks are
  1781.      added to make it easier to see which parts of the code do what.
  1782.      You can add remarks to your code anywhere by prefixing them
  1783.      with an apostrophe.
  1784.  
  1785.      At the point where we are about to print the list items we
  1786.      start another "For" loop.  This time "For Manufacturers".  When
  1787.      one "For" loop is "Nested" within another, the record currently
  1788.      loaded by the first loop remains in memory while the records
  1789.      selected by the "Nested" loop are processed and all the fields
  1790.      of both records are available at the same time.
  1791.  
  1792.      As we have qualified the "Manufacturers" loop:-
  1793.  
  1794.      for manufacturers with name = aircraft.manufacturer
  1795.  
  1796.      only the single record in which the "Name" field matches the
  1797.      "Aircraft.manufacturer" field which is currently loaded by the
  1798.      outer loop will be selected from the "Manufacturers" form.
  1799.  
  1800.      While we have both the required records in memory we print the
  1801.      list items.
  1802.  
  1803.      All that remains to do now is to edit the output format and add
  1804.      the "Manufacturers.nationality" field to the .List Items
  1805.      section.
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.                                  - 30 -
  1812. ................................................................................
  1813.  
  1814.  
  1815.      By nesting loops in this way, you can list data from any number
  1816.      of different forms which have "Linking" data in one of their
  1817.      fields.  Where only one record matches as in the example above
  1818.      then the required fields go in the .List items section with the
  1819.      other fields.  Where there are many matches (Related list) the
  1820.      fields from the secondary loop have their own print section.
  1821.      (See example on page 5)
  1822.  
  1823.      Now we can print any of the fields from any "Related" forms in
  1824.      any order.  We are still, however, listing all the records from
  1825.      the "Aircraft" form and we may for example only wish to print
  1826.      those records which are in the "Bomber" group.
  1827.  
  1828.      Start a new procedure and enter the code:-
  1829.  
  1830.      Declare output fields
  1831.         Aircraft.knownas : Aircraft.type : Aircraft.base
  1832.      end
  1833.      for aircraft with type = "Bomber"
  1834.         print list items
  1835.      next
  1836.  
  1837.      Create the output format placing the three output fields within
  1838.      the .List Items section.
  1839.  
  1840.      When you run this report, only the bombers will be listed but,
  1841.      once more, the aircraft names will be in the order in which
  1842.      they were entered to the form.
  1843.  
  1844.      To get them in alphabetic order we must again use the compound
  1845.      index on the "Typename" field. This time we have to ensure that
  1846.      the loop starts with the first "Bomber" and ends with the last
  1847.      "Bomber".
  1848.  
  1849.      Declare output fields
  1850.         Aircraft.knownas : Aircraft.type : Aircraft.base
  1851.      end
  1852.      declare variables
  1853.         group as text
  1854.      end
  1855.      group = "Bomber"
  1856.      for aircraft with typename > "Bomber"
  1857.         if aircraft.type <> group then exit for
  1858.         print list items
  1859.      next
  1860.  
  1861.      Before starting the "For" loop we set a variable "Group" to the
  1862.      value "Bomber". The "For" loop is then qualified such that the
  1863.      records will be processed with "Typename" in order but starting
  1864.      with the first occurrence of "Bomber" in the field.  To stop
  1865.      the loop when all the bombers have been processed we test the
  1866.      contents of the "Aircraft.type" field on each iteration of the
  1867.  
  1868.  
  1869.                                  - 31 -
  1870. ................................................................................
  1871.  
  1872.  
  1873.      loop and when the first record is loaded which is not a bomber
  1874.      we stop processing the loop with the command "Exit For".
  1875.  
  1876.      As in the first procedure, we could now add Page headers, Page
  1877.      footers and number the pages Etc.
  1878.  
  1879.      Suppose however that having created this procedure we now
  1880.      wanted a list of all the "Airliners".
  1881.  
  1882.      We could achieve this by changing "Bomber" to "Airliner" within
  1883.      the code but this would be time consuming. It would be much
  1884.      better if we could tell Easy Base which type group we wanted at
  1885.      the start of the procedure and have Easy Base make the
  1886.      necessary changes.
  1887.  
  1888.      To supply "Variables" to a procedure before running we use an
  1889.      "Input Screen", the third part of a procedure.  Save the code
  1890.      and select item 3 (Create Input Screen) from the procedures
  1891.      menu.
  1892.  
  1893.      As soon as you select item 3 Easy Base will ask if you wish to
  1894.      copy an existing form. Type "N" for no.  The next screen will
  1895.      be familiar to you.  It is exactly the same as the form design
  1896.      screen.
  1897.  
  1898.      When you first designed your forms, the form design routine
  1899.      performed two tasks. It created your form and also a default
  1900.      input screen from which to enter data. Now that you are about
  1901.      to create input screens for procedures, the same routine is
  1902.      used to design the screen.  It does not, of course, create a
  1903.      parallel form.
  1904.  
  1905.      All the facilities for "Polishing" your forms - all the
  1906.      facilities for deriving, calculating looking up and testing
  1907.      derivations which you had in Form Design are also available for
  1908.      Input Screen design.
  1909.  
  1910.      The only difference you will notice is that when you define a
  1911.      field, the "Unique" and "Indexed" attributes are marked "Not
  1912.      Applicable" and when you run the procedure, only the "Options"
  1913.      "Clear Screen after Running Procedure" and "Clear Field on
  1914.      Editing" are available.
  1915.  
  1916.      Move the cursor to somewhere near the middle of the screen and
  1917.      type:- "Which Aircraft type would you like listed".  Then press
  1918.      F10 to define a field.
  1919.  
  1920.      If, in the aircraft form the "Type" field had been defined as a
  1921.      choice field, then we would define this field as a choice field
  1922.      and use the same list.
  1923.  
  1924.      If, on the other hand the "Type" field in the "Aircraft" form
  1925.  
  1926.  
  1927.                                  - 32 -
  1928. ................................................................................
  1929.  
  1930.  
  1931.      looked up its contents from a core data form containing the
  1932.      type names then we would set the attributes:-
  1933.  
  1934.      Name            type
  1935.      Data type       text
  1936.      Field Length    15    (Same as the "Type" field in "Aircraft")
  1937.      Mandatory       Yes
  1938.      User Entry      Yes
  1939.      Display         Field  (or text or Alt colours as you wish)
  1940.      Derived         No
  1941.  
  1942.      The field will of course be derived:- Lookup(Aircraft,type)
  1943.      but as we have not yet entered the relationship, we will leave
  1944.      the derived attribute set to "No" to prevent an error message
  1945.      when we save the screen.
  1946.  
  1947.      Save the screen.  When you do, you will be asked to select
  1948.      between "Repeat Screen after F2" and "Run Once and Exit".
  1949.  
  1950.      If you choose the first option then the procedure will repeat
  1951.      until you press the Escape Key. If you choose the second
  1952.      option, control will return to the procedures menu after the
  1953.      report has been run.
  1954.  
  1955.      Now save the procedure.  Let's call it "Aircraft By Type".
  1956.  
  1957.      You may have noticed that all Form, Field and Procedure names
  1958.      so far have been single words.  There is no restriction on
  1959.      using multiple words in names but single ones make code much
  1960.      easier to read. The only good reason to use more than one word
  1961.      is in a reporting procedure name. After the procedure has been
  1962.      run the status line in Browse mode will be "Procedure:-
  1963.      Aircraft By Type" which makes more sense to an end user than
  1964.      "Procedure:- ACbytyp".
  1965.  
  1966.      Now go to Relationships and enter the relationship "Aircraft"
  1967.      between "Aircraft by Type" and "Aircraft" linking the two
  1968.      fields "Type".
  1969.  
  1970.      Reload the "Aircraft by Type" procedure and edit the Input
  1971.      screen setting the derived attribute to "yes" and entering the
  1972.      derivation formula:-  Lookup(aircraft,type)
  1973.  
  1974.      Save the screen again and select "Edit Procedure Code".
  1975.  
  1976.      To use the Input screen quickly you could change the two
  1977.      occurrences of "Bomber" to input.type. However, now that we
  1978.      have an input.type field the variable "group" is superfluous.
  1979.  
  1980.      The finished procedure code and Output format are shown on the
  1981.      next page.
  1982.  
  1983.  
  1984.  
  1985.                                  - 33 -
  1986. ................................................................................
  1987.  
  1988.  
  1989.      Declare output fields
  1990.         Aircraft.knownas : Aircraft.base
  1991.         Page number : input.type
  1992.      end
  1993.      Print report header
  1994.      for aircraft with typename > input.type
  1995.         if bottom margin < 1 then
  1996.            print report footer
  1997.            page feed : print page header
  1998.         end if
  1999.         if aircraft.type <> input.type then exit for
  2000.         print list items
  2001.      next
  2002.      print report footer
  2003.      page feed
  2004.  
  2005.  
  2006.      ......................Output Format.........
  2007.  
  2008.      .Report Header
  2009.             ══════════════════════════════════════════════
  2010.                           ████████████ LIST
  2011.                           ════════════
  2012.                 Name                   Built at
  2013.             ──────────────────────────────────────────────
  2014.      .Page header
  2015.             ──────────────────────────────────────────────
  2016.                 Name                   Built at
  2017.             ──────────────────────────────────────────────
  2018.      .List items
  2019.                 ████████████████████   █████████████████
  2020.      .Page Footer
  2021.  
  2022.                              - ██ -
  2023.      .Report Footer
  2024.             ══════════════════════════════════════════════
  2025.      .End
  2026.  
  2027.  
  2028.      The field in the Report header is input.type.  The fields in
  2029.      the list items are Aircraft.knownas and Aircraft.base.
  2030.      The field in the page footer is Page number.
  2031.  
  2032.      Suppose now that we print out the report and find that we had
  2033.      entered all the "Aircraft" "Knownas" fields in Upper case and
  2034.      all the "Base" fields in Lower case.  This would make the
  2035.      report quite untidy.  There is no need however to change the
  2036.      original data. To print both fields in Upper case all we need
  2037.      to do is alter each of the "Base" field contents using the
  2038.      "Upper" Function before printing it.
  2039.  
  2040.      To do this insert the line:-
  2041.  
  2042.  
  2043.                                  - 34 -
  2044. ................................................................................
  2045.  
  2046.  
  2047.         aircraft.base = upper(aircraft.base)
  2048.  
  2049.      immediately before the print list items command.
  2050.  
  2051.      As well as simply "Listing" data you can manipulate it in many
  2052.      different ways.  You can do any form of arithmetic on numeric
  2053.      fields and you can alter text, date and time fields with over
  2054.      fifty different functions.
  2055.  
  2056.      A function is a small internal routine which returns a value
  2057.      derived from one or more other values (Parameters) which you
  2058.      supply.  For Example, in the code line:-
  2059.  
  2060.      date = datetext(invoice.date)
  2061.  
  2062.      "Datetext" is a function to which you are passing the parameter
  2063.      "Invoice.date".  If invoice.date is 02/02/94 then the function
  2064.      "Datetext" will derive the text "2nd February 1994" and
  2065.      "Return" this as if it were a variable. The output field "Date"
  2066.      will therefore become "2nd February 1994".
  2067.  
  2068.      A functions parameters are always passed to it enclosed in
  2069.      brackets.  If there are more than one then they are separated
  2070.      by commas.
  2071.  
  2072.      The next section of the Manual introduces you to Procedures
  2073.      which perform transactions.  You should now read the
  2074.      descriptions of the following commands in the Programmers
  2075.      Reference.
  2076.  
  2077.      Copy All From
  2078.      Delete Record
  2079.      Clear Records From
  2080.      Update Record
  2081.      Pause On/Off
  2082.      Escape On/Off
  2083.  
  2084.      Together with the field control "Beep".
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.                                  - 35 -
  2102. ................................................................................
  2103.  
  2104.  
  2105.                      PROCEDURES (TRANSACTIONAL)
  2106.  
  2107.      In Data Entry you make a "Transaction" when you add, update or
  2108.      delete a record.  You can make the same transactions in
  2109.      procedures.  There are, however, two major advantages to
  2110.      making your transactions via procedures.
  2111.  
  2112.      1.   You control which transactions can and cannot be made.
  2113.  
  2114.      2.   You can make any number of different transactions in any
  2115.           number of different forms.
  2116.  
  2117.      Consider the "Customers" form.  You would want any of your
  2118.      staff to be able to add a new customer in your absence. If you
  2119.      allow them to do this in Record Entry then they could also
  2120.      (deliberately or inadvertently) alter or delete other customers
  2121.      records.
  2122.  
  2123.      To prevent this, create a new procedure.  Create an input
  2124.      screen.  When you are asked if you wish to copy an existing
  2125.      form - reply "Yes" and select the customers form.  Save the
  2126.      input screen and select Create Procedure Code. Now enter the
  2127.      procedure code:-
  2128.  
  2129.      for customers new record
  2130.         copy all from input
  2131.      next
  2132.  
  2133.      Save the procedure - Let's call it "Enter customers".  You can
  2134.      now call this procedure from your "User Menus" described in the
  2135.      next section and your staff will be able to enter new customers
  2136.      without the opportunity to make any other transactions.
  2137.  
  2138.      You can also control parts of a transaction.  If your
  2139.      "Customers" form had a field for "Creditlimit" then, in the
  2140.      form, you would wish to be able to enter any credit limit you
  2141.      wanted, but you might wish to restrict the amount your staff
  2142.      could enter for a new customer.
  2143.  
  2144.      To do this you simply edit the field attributes for the
  2145.      "Creditlimit" field in the input screen.
  2146.  
  2147.      To set a fixed credit limit of say £500.00 set the user entry
  2148.      attribute to "No", the derived attribute to "Yes" and enter the
  2149.      derivation formula:- 500.
  2150.  
  2151.      To restrict the entry to a maximum of say £1000.00 you would
  2152.      leave the user entry attribute set to "yes" but derive the
  2153.      field:-  If(creditlimit > 1000,blank[beepMaximum credit £1000
  2154.               for new customers],creditlimit)
  2155.  
  2156.      There might also be fields on the "Customers" form which are
  2157.  
  2158.  
  2159.                                  - 36 -
  2160. ................................................................................
  2161.  
  2162.  
  2163.      irrelevant to the transaction of adding a new customer.  You
  2164.      might also have fields for personal comments which you do not
  2165.      wish your staff to see.  You can simply delete these from the
  2166.      input screen or change them to invisible.
  2167.  
  2168.      In other words you can limit a transaction in any way you wish
  2169.      and the final input screen can be totally different to the
  2170.      original form.
  2171.  
  2172.      Transaction procedures which delete or update records are
  2173.      created in a similar manner but are slightly more complicated.
  2174.  
  2175.      To create a procedure which allows your staff to delete
  2176.      customers, you would again copy the customers form as the input
  2177.      screen.  This time, the only field to which you allow User
  2178.      Entry is the "acountno" field.  You enter a relationship
  2179.      between this report and the "Customers" form linking "acountno"
  2180.      and derive all the other fields you wish to show as:-
  2181.  
  2182.      lookup(customers,name)
  2183.      lookup(customers,address)
  2184.      Etc.
  2185.  
  2186.      Your staff now enter the account number to be deleted. The
  2187.      other "looked up" fields are only there so that the name and
  2188.      address will appear confirming that the correct account number
  2189.      has been entered.
  2190.  
  2191.      The procedures code to delete the record is:-
  2192.  
  2193.      for customers with acountno = input.acountno
  2194.         delete record
  2195.      next
  2196.  
  2197.      As with the procedure to add a record you are still in complete
  2198.      control of what can or cannot be done.  Suppose that you had a
  2199.      field on the "customers" form which you kept updated with his
  2200.      account balance.  You would not want anyone to delete a
  2201.      customer who still had an outstanding balance on his account.
  2202.  
  2203.      To prevent this, just change the derivation for the "balance"
  2204.      field to :-
  2205.  
  2206.      if(lookup(customers,balance) <> 0,blank[beepCustomers cannot be
  2207.      deleted until their A/C is clear],0)
  2208.  
  2209.      You would also set the Mandatory attribute to "Yes" to prevent
  2210.      anyone from ignoring the warning.
  2211.  
  2212.      If you wanted a procedure which allowed staff to change a
  2213.      customers address but no other fields, then you would create
  2214.      the same input screen as for the delete record and the same
  2215.  
  2216.  
  2217.                                  - 37 -
  2218. ................................................................................
  2219.  
  2220.  
  2221.      relationship but this time you would allow user entry to the
  2222.      address field and derive it:-
  2223.  
  2224.      Default(lookup(customers,address))
  2225.  
  2226.      When the operator enters the account number for the customer
  2227.      whose address he wishes to change, the old address will appear
  2228.      to confirm that he has the right customer, but he will be able
  2229.      to edit it.
  2230.  
  2231.      The procedure code would be:-
  2232.  
  2233.      for customers with acountno = input.accountno
  2234.         customers.address = input.address
  2235.         update record
  2236.      next
  2237.  
  2238.      The second advantage of making transactions via procedures is
  2239.      that you can perform several tasks at once. Consider a Video
  2240.      Library hiring films to its members. There will be a form for
  2241.      the films, one for the members and one for daily takings.
  2242.  
  2243.      The procedure used for hiring out the films will have an input
  2244.      screen with a field for the members number, possibly three
  2245.      fields for the film numbers being hired, three more fields in
  2246.      which the films rental prices are looked up and one in which
  2247.      these three fields are totalled.  When the operator runs the
  2248.      procedure all the necessary transactions are performed by the
  2249.      procedure code:-
  2250.  
  2251.      for members with number = input.member
  2252.         if input.film1 <> blank then members.film1 = input.film1
  2253.         if input.film2 <> blank then members.film2 = input.film2
  2254.         if input.film3 <> blank then members.film3 = input.film3
  2255.         update record
  2256.      next
  2257.      if input.film1 <> blank then
  2258.         for films with number = input.film1
  2259.            films.hiredto = input.member
  2260.            films.datehired = system date
  2261.            update record
  2262.         next
  2263.      end if
  2264.      for daily takings
  2265.         total = total + input.total
  2266.         update record
  2267.      next
  2268.  
  2269.      The mid section of the code updating film1's record would of
  2270.      course be repeated for film2 and film3 but has been omitted for
  2271.      clarity.
  2272.  
  2273.  
  2274.  
  2275.                                  - 38 -
  2276. ................................................................................
  2277.  
  2278.  
  2279.                             USER MENUS
  2280.  
  2281.      Once you have created forms and procedures you can create an
  2282.      end user menu system to run them.  You could wait till all your
  2283.      procedures are finished but you will get a much better feel for
  2284.      how your program is developing if you start and use a menu
  2285.      system as you go.  Easy Base includes a User Menu call to its
  2286.      system menus so you can work from your own developing menu
  2287.      system while you are still developing your program.
  2288.  
  2289.      Select "Menus" from the main menu and have a look at the
  2290.      screen.  The Menus screen is an internal form just like the
  2291.      ones you have created. You have all the same facilities to
  2292.      enter, update and delete menus that you have in Data Entry to
  2293.      one of your own forms.
  2294.  
  2295.      Let's create a menu based on some of the forms and procedures
  2296.      previously discussed.
  2297.  
  2298.      The first field on the menus form is "Menu Name".  This is the
  2299.      unique field and a name must be supplied.  We'll call it
  2300.      "Customers".  The next field is "Menu Type". This is a choice
  2301.      field with two options, "Normal" and "Batch Execute".  The
  2302.      "Batch Execute" option will be discussed later.  For now,
  2303.      select "Normal".
  2304.  
  2305.      The third field is "Menu Title". Whatever you enter here will
  2306.      be displayed as a title (or heading) above your menu.
  2307.  
  2308.      The fourth field which is untitled on the screen is a choice
  2309.      field with the options, "Run on Number Key" and "Run on Return
  2310.      Key".  If you choose the first option then the items on your
  2311.      menu will be run as soon as the item number is pressed and if
  2312.      you choose the second option then typing the item number will
  2313.      move the highlight bar to the selection but the item will not
  2314.      be called until the return key is pressed.  In either case you
  2315.      will still be able to select items with the cursor control keys
  2316.  
  2317.      The next field asks for a "Sign on password" if a startup menu.
  2318.      You can start your application (program) on any menu that has
  2319.      a sign on password by restarting Easy Base and using that
  2320.      password instead of your developers password.  In this case we
  2321.      are going to menu the reports which add, delete and alter a
  2322.      customers address. This will be a sub menu so we leave this
  2323.      field blank.
  2324.  
  2325.      The main section of the "Menus" form has three columns of nine
  2326.      fields.  The first column is for the text to be displayed on
  2327.      the menu.  The second is for the type of action (function)
  2328.      which is to be called.  The third is for the individual item.
  2329.  
  2330.  
  2331.  
  2332.  
  2333.                                  - 39 -
  2334. ................................................................................
  2335.  
  2336.  
  2337.      With the cursor in the first text field we type:-
  2338.  
  2339.      Enter a New Customer      and press return.
  2340.  
  2341.      As soon as the cursor moves to the first "Function" field a
  2342.      menu appears listing all the different functions that can be
  2343.      called.  The first four choices allow you to:-
  2344.  
  2345.      1.   Run one of your procedures.
  2346.      2.   Recall the last output from one of your procedures.
  2347.      3.   Call the data entry screen for one of your forms.
  2348.      4.   Call another of your menus.
  2349.  
  2350.      The other functions are selected utilities from the system
  2351.      utilities menu which you may wish to provide to the
  2352.      end user without allowing him access to the entire system.
  2353.  
  2354.      Select "Run Procedure" and press return.
  2355.  
  2356.      When the cursor moves to the "Item" column Easy Base will list
  2357.      all your procedures. Choose "Enter customers".
  2358.  
  2359.      on the next two lines enter:-
  2360.  
  2361.      Delete Existing Customer   Run Procedure    Delete Customers
  2362.      Change Customers Address   Run Procedure    Address Change
  2363.  
  2364.      and press F2 to save the menu.
  2365.  
  2366.      Now let's make a start to the main "Startup" menu.  We may not
  2367.      have any procedures to put on it yet but we can get started
  2368.      with an item to call data entry to "Customers" and one to call
  2369.      the "Customers" sub menu.
  2370.  
  2371.      Fill in a new menus record using the name "Main Menu", Type
  2372.      "Normal" and Title "- M A I N   M E N U -".  This time enter a
  2373.      startup password, say "Fred".  Complete the Items section
  2374.      with:-
  2375.  
  2376.      Customers Records          Data Entry       Customers
  2377.      Customer Updates           User Menu        Customers
  2378.      Program Development        System menus
  2379.  
  2380.      Press F2 to save this menu then press escape all the way out to
  2381.      the DOS prompt (or your hard disk menu system).  Restart Easy
  2382.      Base.  This time, when the sign on screen appears, enter "Fred"
  2383.      and press return.
  2384.  
  2385.      Instead of the system menus, you will see your "Main Menu".
  2386.      If you select item 1 the "Customers" form will come up. If you
  2387.      select item 2 your sub menu will be overlaid and you can run
  2388.      any of the three procedures on it.  If you select item 3 you
  2389.  
  2390.  
  2391.                                  - 40 -
  2392. ................................................................................
  2393.  
  2394.  
  2395.      will be transferred to the Easy Base System menus where you can
  2396.      continue with the development of your program.
  2397.  
  2398.      Whenever you create new procedures or forms you can add them to
  2399.      your menu system.
  2400.  
  2401.      Suppose you would like the utilities, Backup Data, Restore Data
  2402.      and Install Printer to be available from your menu system.
  2403.      Create a new menu, let's call it "Utilities" with the items:-
  2404.  
  2405.      Backup data to disk        Backup Data
  2406.      Restore data from disk     Restore Data
  2407.      Install Printer            Install Printer
  2408.  
  2409.      Save this new menu then edit your main menu to include the new
  2410.      item:-
  2411.  
  2412.      Utilities                  User menu           Utilities
  2413.  
  2414.      When you have called the Easy Base system menus from one of
  2415.      your own menus then pressing escape does not exit the program,
  2416.      it returns you to your own menu.  You close down by pressing
  2417.      escape from your main menu.  When you get back to your "Main
  2418.      Menu" you will notice that the new "Utilities" item is not
  2419.      there. New Menu items cannot be added while the program is
  2420.      running. To incorporate the "Utilities" item you must again
  2421.      exit the program and restart with the password "Fred".
  2422.  
  2423.      As your program develops you can create as many menus as you
  2424.      need. Your "Main Menu" can call up to nine sub menus. Each of
  2425.      those can call another nine sub sub menus Etc Etc. You can also
  2426.      have additional startup menus with different passwords. These
  2427.      can either run completely different menus or can restrict
  2428.      different parts of the menu system to different users.
  2429.  
  2430.      When you start up on one of your menus systems Easy Base
  2431.      creates a default "Tree" structure for it.  From whichever menu
  2432.      is on screen the escape key backsteps down the tree until you
  2433.      reach your "Main Menu" and then exits the program.
  2434.  
  2435.      If one of the "forward" menu calls crosses branches, ie it
  2436.      calls a menu which is also called from a lower level then
  2437.      subsequent presses of the escape key backstep down the current
  2438.      branch and not back "cross tree".
  2439.  
  2440.      You can also make menu calls from low to high levels. (a sub-
  2441.      sub- sub menu can have an item which calls the main menu).
  2442.  
  2443.      In some circumstances you may prefer a hierarchical rather than
  2444.      a tree structure where the main menu is recalled after each
  2445.      individual procedure.  To accomplish this, each final item is
  2446.      placed on its own menu followed by a call to the main menu and
  2447.  
  2448.  
  2449.                                  - 41 -
  2450. ................................................................................
  2451.  
  2452.  
  2453.      the menu type is changed to "Batch Execute".
  2454.  
  2455.      When you create a "Batch Execute" menu then instead of
  2456.      displaying a menu for you to choose from, Easy Base
  2457.      executes each item on the menu in sequence and then returns to
  2458.      the menu which called it.
  2459.  
  2460.      With batch execute menus you can automate many of the processes
  2461.      in your application.  If you have several printouts to be done
  2462.      each day you can have them all done from batch execute menus.
  2463.      Similarly, if you need to update many reporting procedures for
  2464.      later "Recall" to the screen, these can all be done at once.
  2465.      There is no limit to the number of procedures which can be
  2466.      batched - One batch menu can call another.
  2467.  
  2468.      If you create a "Startup" batch menu then, provided it does not
  2469.      call a "Normal" menu, Easy Base will perform all the tasks on
  2470.      the menu and then exit to DOS.
  2471.  
  2472.      If you create a "Startup" batch menu which eventually calls a
  2473.      "Normal" menu then the batch process stops at that point and
  2474.      the "Normal" menu becomes the main (root) menu.  Pressing
  2475.      escape from this menu exits to DOS. it never returns to the
  2476.      startup batch menu which called it
  2477.  
  2478.      Start up batch menus are useful for running regular daily
  2479.      procedures and for forcing the user to check the system date
  2480.      and time.
  2481.  
  2482.      There are many other uses for batch execute menus.  You can
  2483.      automate menu changes. If, for example, running one particular
  2484.      procedure is invariably followed by  running one from a choice
  2485.      of three others then the menu containing the others can be
  2486.      batched after the first procedure.
  2487.  
  2488.      In Easy Base you can create quite long and complex procedures
  2489.      but they are eventually limited by memory constraints.  If you
  2490.      ever run out of memory creating a long procedure then just
  2491.      split it and batch the parts.
  2492.  
  2493.      Don't forget to set the output of non print reports to "Disk"
  2494.      otherwise Browse Mode will be invoked.
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.                                  - 42 -
  2508. ................................................................................
  2509.  
  2510.  
  2511.                       EXTERNAL FILE ACCESS
  2512.  
  2513.      In order to provide flexible import and export to data files
  2514.      external to your applications, Easy Base includes a complete
  2515.      set of low level file access commands. :- Open, Close, Seek
  2516.      Read, Write, Find, Shell and Erase.
  2517.  
  2518.      Full details of the commands and how to use them are given in
  2519.      the programmers reference but please read the following notes.
  2520.  
  2521.      You can only open one external file at a time but you can
  2522.      transfer data either way between it and any number of Easy Base
  2523.      files.
  2524.  
  2525.      You can open any number of external files within one procedure
  2526.      but you must close each before you open the next.
  2527.  
  2528.      In Easy Base all data is converted to a common type for
  2529.      processing. Within the system this has the advantage that you
  2530.      never need to worry about what type of data you are handling.
  2531.      You can assign a text field's value to a numeric field and you
  2532.      can assign the result of a calculation to a text field.
  2533.      However, in order to do this Easy Base pre processes text
  2534.      variables. If you are accustomed to file access, string
  2535.      manipulation and trimming functions then you may get unexpected
  2536.      results.
  2537.  
  2538.      Here are the rules:
  2539.  
  2540.      If you read a string to an Easy Base text field all leading and
  2541.      trailing spaces are removed. If the remaining string is longer
  2542.      than the declared field length then it is truncated to the
  2543.      field length.
  2544.  
  2545.      If you read a string to an Easy Base text variable then all
  2546.      trailing spaces are removed. Text Variables are variable
  2547.      length.
  2548.  
  2549.      If you wish to create a string with leading spaces for a write
  2550.      command then you must do it in a text variable. Text fields do
  2551.      not accept leading spaces. You can pad strings with spaces
  2552.      using the Spacepad and Jointext(stringof()) functions.
  2553.  
  2554.      If you read an ASCII line then it is read without the Cr/Lf
  2555.      sequence.
  2556.  
  2557.      You can read ASCII directly into numeric fields.
  2558.  
  2559.      The data in an Easy Base Text Block field is formatted with a
  2560.      single Chr$(13) wherever a new line is to be forced.
  2561.  
  2562.      To read ASCII to a Text Block field, read lines to a variable
  2563.  
  2564.  
  2565.                                  - 43 -
  2566. ................................................................................
  2567.  
  2568.  
  2569.      then join the variable to the field with an intervening
  2570.      CHr$(13).
  2571.  
  2572.      Ex.
  2573.      read line to LineVar
  2574.      Pupils.notes = Jointext(pupils.notes,Chr$(13),Linevar)
  2575.  
  2576.      To Write a Text Block field as ASCII lines use the keyword
  2577.      Line_Len in the write command.
  2578.  
  2579.      Ex.
  2580.      write Pupils.Notes Line_len 60
  2581.  
  2582.      You cannot write quotation marks within quoted text. Whenever
  2583.      Easy Base processes a text field, variable or read in string it
  2584.      substitutes Chr$(127) for internal quotation marks and replaces
  2585.      them after the process. This substitution is not done for
  2586.      direct assignments. TextVar = "Fred said "Hello"" is not
  2587.      allowed. If you need to make such an assignment then you must
  2588.      replace the internal quotation marks with Chr$(127) yourself.
  2589.      To create CHR$(127) in the procedure editor, hold down the ALT
  2590.      key and type 127 on the numeric keypad.
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.                                  - 44 -
  2624. ................................................................................
  2625.  
  2626.  
  2627.                     EASY BASE DATA FILE FORMAT
  2628.  
  2629.      Easy Base data files are fixed length record files with no
  2630.      field separator. There is no file header.
  2631.  
  2632.      There is a three byte record header. Byte one is "L" for a live
  2633.      record and "D" for a record marked for deletion. Bytes 2 and 3
  2634.      are null.
  2635.  
  2636.      The field order is top left to bottom right from the default
  2637.      input screen.
  2638.  
  2639.      All text fields are ASCII.
  2640.  
  2641.      All numeric, date and time fields are Microsoft 8 Byte double
  2642.      precision numbers.
  2643.  
  2644.      In the case of dates, this represents the number of days from
  2645.      the first of January 1981 and in the case of time, the number
  2646.      of seconds from midnight.
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.                                  - 45 -
  2682. ................................................................................
  2683.  
  2684.  
  2685.                          SYSTEM REQUIREMENTS
  2686.      Required.
  2687.  
  2688.          IBM or compatible 286 or higher
  2689.          1Meg Ram
  2690.          540k free conventional memory
  2691.  
  2692.      Preferred.
  2693.  
  2694.         4 Meg expanded memory with 2 Meg allocated to PC-Cache
  2695.  
  2696.      NOTE:-
  2697.         If you have 2 Meg of expanded memory then certain EMS
  2698.      managers can cause Easy Base not to load with the error message
  2699.      "Insufficient EMS to load overlays". If this happens to you
  2700.      then you can load Easy Base in conventional memory by remming
  2701.      out the EMS driver in your Config.Sys file.
  2702.  
  2703.                          SYSTEM LIMITATIONS
  2704.  
  2705.      Fields per Form         500
  2706.      Indexes per Form        500
  2707.      Record Length           Limited by display of 4 screen pages
  2708.      Records per Form        Limited by Maximum data or index file
  2709.                              length of 2,100 Megabytes
  2710.  
  2711.      Forms per application       }     Total of 500 in
  2712.      Procedures per application  }     any combination.
  2713.      Menus per application             500
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.                                  - 46 -
  2740. ................................................................................
  2741.  
  2742.  
  2743.                        DOS FILENAME CONVENTIONS
  2744.  
  2745.      The Easy Base system files are:-
  2746.  
  2747.         EB.EXE     The program file
  2748.         EB.CUR     Initial screen setup
  2749.         EB.SET     Configuration file
  2750.         EB.MEN     User Menus form
  2751.         EB.REL     Relationships form
  2752.         EB.MSG     Text and error messages
  2753.         EB.PRS     Printer drivers
  2754.         EB.D01     Main dictionary
  2755.         EB.DO2     Personal dictionary
  2756.  
  2757.      The files which are created in the data directories have the
  2758.      following filename convention:-
  2759.  
  2760.      Forms:-
  2761.  
  2762.         BASE(No).DEF      The entry screen definition.
  2763.         BASE(No).DAT      The data file.
  2764.         BASE(No).(No)     Index files.
  2765.  
  2766.      Choice field lists
  2767.  
  2768.         LIST(No).DAT
  2769.  
  2770.      Procedures
  2771.  
  2772.         PROC(No).PRO      The procedure code.
  2773.         PROC(No).DEF      The input screen.
  2774.         PROC(No).REP      The output from the procedure.
  2775.  
  2776.      There are also six individual files:-
  2777.  
  2778.         MENUS.DAT         The menus you create.
  2779.         RELATION.DAT      The relationships you create.
  2780.         CHOICES.DIR       The choice list directory.
  2781.         BASE.DIR          The forms directory.
  2782.         PROC.DIR          The procedures directory.
  2783.         RECOVER.INF       Recovery information to reinstate a form
  2784.                           should you suffer a power failure during
  2785.                           a pack or reformat operation.
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.                                  - 47 -
  2798. ................................................................................
  2799.  
  2800.  
  2801.      Easy Base is a registered trade mark of John Turnbull.
  2802.  
  2803.      Easy Base documentation is copyright John Turnbull 1994. It may
  2804.      be freely distributed as part of the Shareware program and
  2805.      users of Easy Base may print a single copy of the documentation
  2806.      for their own use. All other rights are reserved.
  2807.  
  2808.      Trade marks of any other company included in the documentation
  2809.      are acknowledged.
  2810.  
  2811.      John Turnbull disclaims all warranties as to this software,
  2812.      whether express or implied, including without limitation any
  2813.      implied warranties of merchantability, fitness for a particular
  2814.      purpose, functionality, data integrity or protection.
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.                                  - 48 -
  2856. ................................................................................
  2857.